84% better-author-metabox

Code Review | Better Author Metabox

WordPress plugin Better Author Metabox scored84%from 54 tests.

About plugin

  • Plugin page: better-author-met...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2015
  • Latest release: Nov 19, 2019
  • Number of updates: 15
  • Update frequency: every 115.7 days
  • Top authors: shooflydesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,874 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
Install script ran successfully

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

This is a short check of server-side resources used by Better Author Metabox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.33 ▼0.84
Dashboard /wp-admin3.36 ▲0.0547.65 ▼0.74
Posts /wp-admin/edit.php3.41 ▲0.0545.41 ▼3.15
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.18 ▼11.24
Media Library /wp-admin/upload.php3.28 ▲0.0534.72 ▲0.61
Better Author Metabox /wp-admin/options-general.php?page=ba-metabox-config3.2531.61

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Better Author Metabox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.071.73 ▼0.0044.29 ▲7.75
Dashboard /wp-admin2,199 ▲225.50 ▼0.0781.98 ▼5.3837.76 ▼6.59
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0539.30 ▼0.9437.18 ▲2.84
Add New Post /wp-admin/post-new.php1,538 ▲918.26 ▼4.80620.75 ▼50.5975.54 ▲25.57
Media Library /wp-admin/upload.php1,407 ▲44.16 ▼0.02100.06 ▲3.8041.40 ▲0.05
Better Author Metabox /wp-admin/options-general.php?page=ba-metabox-config8592.0221.7628.44

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/better-author-metabox/options-page.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 to be fixed:
  • Screenshots: Screenshot #1 (The metabox appears beneath the main block editor window in WordPress 5.0 and up, along with other metaboxes using the longstanding metabox APIs.) image required
  • Plugin Name: You should set the name of your plugin on the first line ( === better-author-metabox === )
You can look at the official readme.txt

better-author-metabox/better-author-metabox.php Passed 13 tests

The principal PHP file in "Better Author Metabox" v. 1.0.4 is loaded by WordPress automatically on each request
82 characters long description:
Allows the Author metabox to be overridden with one that includes different users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin243 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26371243

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods19.09%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.86KB19.17KB▼ 66.88%
screenshot-2.png21.03KB5.65KB▼ 73.14%