83% metabox-creator

Code Review | MetaBox Creator

WordPress plugin MetaBox Creator scored83%from 54 tests.

About plugin

  • Plugin page: metabox-creator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2015
  • Latest release: Feb 12, 2015
  • Number of updates: 4
  • Update frequency: every 4.8 days
  • Top authors: paul-henri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /993 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.37MB] [CPU: ▼2.18ms] Passed 4 tests

Server-side resources used by MetaBox Creator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3853.87 ▲6.39
Dashboard /wp-admin3.67 ▲0.3759.93 ▲4.60
Posts /wp-admin/edit.php3.79 ▲0.4455.71 ▲3.45
Add New Post /wp-admin/post-new.php6.26 ▲0.3794.10 ▼17.98
Media Library /wp-admin/upload.php3.60 ▲0.3739.21 ▲1.21

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

MetaBox Creator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,529 ▼23214.14 ▼0.212.42 ▲0.1252.97 ▲8.53
Dashboard /wp-admin1,946 ▼2315.51 ▼0.0689.79 ▼12.5842.44 ▼5.20
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0136.06 ▼1.8437.72 ▲0.15
Add New Post /wp-admin/post-new.php1,528 ▼823.44 ▲0.19683.12 ▲38.4563.22 ▲1.56
Media Library /wp-admin/upload.php1,394 ▼64.19 ▲0.0696.12 ▼10.9840.58 ▼3.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/metabox-creator/admin.php:135
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/metabox-creator/add-action.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/metabox-creator/metabox.php:54

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === metabox-creator === )
You can take inspiration from this readme.txt

metabox-creator/metabox.php 92% from 13 tests

The main PHP file in "MetaBox Creator" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("metabox-creator.php" instead of "metabox.php")

Code Analysis 97% from 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 plugin6,012 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63754522,264
CSS5192761,946
PHP46355731,802

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 206)
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity361.00
▷ Minimum class complexity361.00
▷ Maximum class complexity361.00
Average method complexity19.95
▷ Minimum method complexity1.00
▷ Maximum method complexity206.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 0.33MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/datepicker.png0.58KB0.59KB0.00%
img/select2x2.png0.83KB0.77KB▼ 6.15%
img/ui-bg_gloss-wave_35_d2d2d2_500x100.png3.73KB0.33KB▼ 91.08%
img/ico-clock.png0.68KB0.50KB▼ 26.96%
img/flags32.png167.57KB54.36KB▼ 67.56%