84% supreme-maps

Code Review | Supreme Maps

WordPress plugin Supreme Maps scored84%from 54 tests.

About plugin

  • Plugin page: supreme-maps
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8.2
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Dec 9, 2021
  • Number of updates: 18
  • Update frequency: every 3.5 days
  • Top authors: divisupreme (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /4,373 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.20MB] [CPU: ▼7.35ms] Passed 4 tests

An overview of server-side resources used by Supreme Maps
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2239.81 ▼9.22
Dashboard /wp-admin3.51 ▲0.1752.78 ▼12.10
Posts /wp-admin/edit.php3.62 ▲0.2748.10 ▼3.19
Add New Post /wp-admin/post-new.php6.11 ▲0.2293.02 ▼4.90
Media Library /wp-admin/upload.php3.43 ▲0.2036.10 ▼2.26

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

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

Browser metrics Passed 4 tests

Supreme Maps: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.23 ▼0.301.76 ▼0.2137.04 ▼4.65
Dashboard /wp-admin2,195 ▲185.61 ▼0.0583.15 ▼3.6138.30 ▼1.33
Posts /wp-admin/edit.php2,100 ▼52.02 ▲0.0338.59 ▲1.6035.56 ▲0.14
Add New Post /wp-admin/post-new.php1,526 ▼923.09 ▲5.11612.25 ▲3.3155.05 ▼7.22
Media Library /wp-admin/upload.php1,400 ▼34.14 ▼0.0799.00 ▼6.5043.86 ▼3.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • supreme_maps_version
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/supreme-maps/includes/modules/LeafletMap/LeafletMap.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/supreme-maps/includes/modules/LeafletMapItem/LeafletMapItem.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/supreme-maps/includes/modules/GoogleMap/GoogleMap.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/supreme-maps/includes/modules/GoogleMapItem/GoogleMapItem.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/supreme-maps/includes/SupremeMaps.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6 in supreme-maps/assets to your readme.txt
Please take inspiration from this readme.txt

supreme-maps/supreme-maps.php Passed 13 tests

The primary PHP file in "Supreme Maps" version 1.0.9 is used by WordPress to initiate all plugin functionality
78 characters long description:
Display beautiful and mobile-friendly interactive maps for your Divi websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,803 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP143277542,749
CSS514928585
JavaScript7190261441
SVG10128

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity19.60
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods63
▷ Static methods23.17%
▷ Public methods6095.24%
▷ Protected methods00.00%
▷ Private methods34.76%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/leaflet/images/marker-shadow.png0.60KB1.16KB0.00%
assets/leaflet/images/layers.png0.68KB1.05KB0.00%
assets/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
assets/leaflet/images/layers-2x.png1.23KB1.67KB0.00%
assets/leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%