94% global-meta-box-order

Code Review | Global Meta Box Order

WordPress plugin Global Meta Box Order scored 94% from 54 tests.

About plugin

  • Plugin page: global-meta-box-o...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3
  • WordPress version: 5.8.1
  • First release: Mar 28, 2015
  • Latest release: Dec 2, 2015
  • Number of updates: 17
  • Update frequency: every 14.7 days
  • Top authors: nosurs (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active / 4,824 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼139.97ms] Passed 4 tests

Server-side resources used by Global Meta Box Order
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1532.56 ▲8.52
Dashboard /wp-admin3.09 ▲0.0440.63 ▲3.61
Posts /wp-admin/edit.php3.14 ▲0.0446.96 ▲2.82
Add New Post /wp-admin/post-new.php5.45 ▲0.0286.96 ▼566.31
Media Library /wp-admin/upload.php3.04 ▲0.0430.53 ▲0.01

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Global Meta Box Order: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.81 ▲0.318.21 ▼7.3348.82 ▲2.05
Dashboard /wp-admin2,970 ▲395.87 ▼0.08138.60 ▼8.01105.64 ▼2.98
Posts /wp-admin/edit.php2,736 ▼32.69 ▼0.0164.24 ▼2.4590.42 ▼6.46
Add New Post /wp-admin/post-new.php1,672 ▲17218.87 ▲0.42357.52 ▼1.18105.28 ▼4.86
Media Library /wp-admin/upload.php1,810 ▲35.00 ▲0.03148.98 ▲0.43117.35 ▼10.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GlobalMetaBoxOrder\\is_admin() in wp-content/plugins/global-meta-box-order/index.php:446

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

global-meta-box-order/index.php 92% from 13 tests

Analyzing the main PHP file in "Global Meta Box Order" version 1.0.3
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("global-meta-box-order.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected161 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1113182157
JavaScript1254

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods215.38%
▷ Protected methods1184.62%
▷ Private methods00.00%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants1
▷ Global constants1100.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
No PNG files were detected