68% svg-map-by-saedi

Code Review | SVG Map Plugin

WordPress plugin SVG Map Plugin scored 68% from 54 tests.

About plugin

  • Plugin page: svg-map-by-saedi
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 5.8.1
  • First release: Mar 10, 2018
  • Latest release: Mar 10, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: smjrifle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 361 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼145.42ms] Passed 4 tests

This is a short check of server-side resources used by SVG Map Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1843.85 ▲16.09
Dashboard /wp-admin3.12 ▲0.0663.53 ▲8.08
Posts /wp-admin/edit.php3.23 ▲0.1249.27 ▼4.61
Add New Post /wp-admin/post-new.php5.47 ▲0.04101.00 ▼579.38
Media Library /wp-admin/upload.php3.06 ▲0.0634.36 ▼5.78

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 24 new files
Database: 1 new table, 1 new option
New tables
wp_svg_map
New WordPress options
svg_map_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for SVG Map Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲22216.34 ▲0.7716.20 ▲4.6846.79 ▼4.62
Dashboard /wp-admin2,992 ▲615.93 ▼0.02149.31 ▼15.68117.78 ▼2.38
Posts /wp-admin/edit.php2,764 ▲252.75 ▲0.0371.69 ▼13.2995.40 ▲1.31
Add New Post /wp-admin/post-new.php1,598 ▼8517.11 ▼1.23428.99 ▼7.32111.08 ▼15.18
Media Library /wp-admin/upload.php1,832 ▲255.08 ▲0.08179.52 ▲13.47130.26 ▲0.01

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_svg_map
  • Zombie WordPress options detected upon uninstall: 1 option
    • svg_map_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/svg-map-by-saedi/public/partials/svg-map-by-saedi-public-display.php
    • > /wp-content/plugins/svg-map-by-saedi/admin/svg-map.php
    • > /wp-content/plugins/svg-map-by-saedi/admin/partials/svg-map-by-saedi-admin-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/svg-map-by-saedi/admin/svg-map.php on line 2639
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/svg-map-by-saedi/admin/svg-map.php:2640

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires php: Version not formatted correctly
You can look at the official readme.txt

svg-map-by-saedi/svg-map-by-saedi.php Passed 13 tests

"SVG Map Plugin" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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 plugin5,709 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP131405355,569
JavaScript2116499
CSS221041

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin