90% meta-box-locationpicker

Code Review | Meta Box Locationpicker

WordPress plugin Meta Box Locationpicker scored90%from 54 tests.

About plugin

  • Plugin page: meta-box-location...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2015
  • Latest release: Jan 16, 2015
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: marcopetersdij (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /710 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.99ms] Passed 4 tests

Analyzing server-side resources used by Meta Box Locationpicker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.91 ▼0.24
Dashboard /wp-admin3.31 ▲0.0148.99 ▲1.11
Posts /wp-admin/edit.php3.36 ▲0.0046.22 ▼2.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.74 ▼14.47
Media Library /wp-admin/upload.php3.23 ▲0.0035.70 ▲2.48

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Meta Box Locationpicker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.421.76 ▲0.1445.74 ▲3.28
Dashboard /wp-admin2,206 ▲175.83 ▲0.9298.04 ▼18.5138.22 ▼6.96
Posts /wp-admin/edit.php2,089 ▼31.97 ▼0.0437.40 ▼2.7035.90 ▲1.51
Add New Post /wp-admin/post-new.php1,514 ▼017.66 ▲0.01703.39 ▲97.0652.43 ▼9.35
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0194.38 ▼4.7241.59 ▲0.80

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === meta-box-locationpicker === )
You can look at the official readme.txt

meta-box-locationpicker/meta-box-locationpicker.php Passed 13 tests

The main file in "Meta Box Locationpicker" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
Meta Box field type for picking a location on an image, like a map

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected91 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112938
JavaScript10037
CSS11016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin