79% my-maps

Code Review | My Maps

WordPress plugin My Maps scored79%from 54 tests.

About plugin

  • Plugin page: my-maps
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.5
  • WordPress version: 6.3.1
  • First release: Apr 23, 2016
  • Latest release: Jan 18, 2018
  • Number of updates: 4
  • Update frequency: every 158.8 days
  • Top authors: plance (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼1.18ms] Passed 4 tests

Server-side resources used by My Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0757.31 ▲11.43
Dashboard /wp-admin3.53 ▲0.2351.03 ▼2.91
Posts /wp-admin/edit.php3.58 ▲0.2353.91 ▲1.26
Add New Post /wp-admin/post-new.php6.07 ▲0.1887.69 ▼6.85
Media Library /wp-admin/upload.php3.39 ▲0.1639.70 ▲3.77

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: 1 new table, 6 new options
New tables
wp_plance_msm_maps
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for My Maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲4124.95 ▲10.711.89 ▲0.0540.16 ▼12.20
Dashboard /wp-admin2,243 ▲6917.91 ▲12.25254.06 ▲160.9639.52 ▼2.95
Posts /wp-admin/edit.php2,148 ▲4814.55 ▲12.52207.05 ▲170.7734.85 ▼4.85
Add New Post /wp-admin/post-new.php1,725 ▲19934.79 ▲11.70753.04 ▲87.9534.98 ▼23.16
Media Library /wp-admin/upload.php1,448 ▲4816.40 ▲12.20242.86 ▲138.7342.23 ▼4.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/my-maps/app/view/admin/data/index.php
    • > /wp-content/plugins/my-maps/my-maps.php
    • > /wp-content/plugins/my-maps/app/db.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Plance_Controller' not found in wp-content/plugins/my-maps/app/controller/admin/Data.php:3
    • > PHP Notice
      Undefined variable: page_title in wp-content/plugins/my-maps/app/view/admin/data/add.php on line 3
    • > PHP Notice
      Undefined variable: _page in wp-content/plugins/my-maps/app/view/admin/data/add.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/my-maps/app/view/admin/data/add.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: google, map, shortcode

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

This is the main PHP file of "My Maps" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Creating shortcode maps, using friendly interface

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
Everything looks great! No dangerous files found in this plugin1,280 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP172174381,150
PO File1303081
JavaScript16040
CSS1209

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.07
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods79
▷ Static methods2835.44%
▷ Public methods6987.34%
▷ Protected methods11.27%
▷ Private methods911.39%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin