74% maphilight

Code Review | MapHilight for Wordpress

WordPress plugin MapHilight for Wordpress scored74%from 54 tests.

About plugin

  • Plugin page: maphilight
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2012
  • Latest release: Oct 22, 2012
  • Number of updates: 22
  • Update frequency: every 0.5 days
  • Top authors: 510crew (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /2,877 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.18ms] Passed 4 tests

Analyzing server-side resources used by MapHilight for Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0347.23 ▲5.88
Dashboard /wp-admin3.34 ▲0.0449.40 ▼0.37
Posts /wp-admin/edit.php3.45 ▲0.1050.74 ▼6.93
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.35 ▼11.28
Media Library /wp-admin/upload.php3.26 ▲0.0340.99 ▲6.21

Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
Map_Hilight

Browser metrics Passed 4 tests

This is an overview of browser requirements for MapHilight for Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.24 ▼0.111.89 ▲0.1042.55 ▲2.16
Dashboard /wp-admin2,210 ▲335.55 ▼0.0491.73 ▲3.1560.77 ▲19.97
Posts /wp-admin/edit.php2,112 ▲122.02 ▲0.0438.51 ▼2.8135.99 ▼1.05
Add New Post /wp-admin/post-new.php1,693 ▲15822.25 ▲4.14654.22 ▼8.0553.90 ▼6.16
Media Library /wp-admin/upload.php1,409 ▲124.15 ▼0.10101.66 ▼5.3574.72 ▲30.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'uninstall' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • Map_Hilight

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Map_Hilight' not found in wp-content/plugins/maphilight/views/page-general.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/maphilight/classes/Map_Hilight_Plugin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (An example of the "General" admin parameters page.)
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

maphilight/maphilight.php Passed 13 tests

The main PHP script in "MapHilight for Wordpress" version 0.2 is automatically included on every request by WordPress
100 characters long description:
MapHilight makes it easy to integrate the javascript needed to make your maps or images interactive.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin435 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP797192240
PO File2353798
JavaScript491058
Markdown118039

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.20
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods19100.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.02MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-16x16.png0.83KB0.80KB▼ 4.57%
images/icon-32x32.png1.53KB1.47KB▼ 3.71%
screenshot-1.png19.62KB18.96KB▼ 3.37%