74% featured-item-metabox

Code Review | Featured Item Metabox

WordPress plugin Featured Item Metabox scored74%from 54 tests.

About plugin

  • Plugin page: featured-item-met...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2013
  • Latest release: Feb 18, 2020
  • Number of updates: 43
  • Update frequency: every 59.9 days
  • Top authors: helgatheviking (83.72%)deployer (18.6%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,641 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.91ms] Passed 4 tests

An overview of server-side resources used by Featured Item Metabox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0646.11 ▲2.27
Dashboard /wp-admin3.37 ▲0.0755.37 ▲1.72
Posts /wp-admin/edit.php3.48 ▲0.1350.28 ▼2.86
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.68 ▼12.76
Media Library /wp-admin/upload.php3.29 ▲0.0740.34 ▲5.36
Featured Items Metabox /wp-admin/options-general.php?page=featured-items-metabox3.2648.39

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Featured Item Metabox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.081.69 ▼0.3245.88 ▲4.29
Dashboard /wp-admin2,196 ▲195.52 ▼0.0885.08 ▼5.8438.04 ▼6.90
Posts /wp-admin/edit.php2,101 ▲11.94 ▼0.0135.54 ▲0.1534.50 ▲2.48
Add New Post /wp-admin/post-new.php1,531 ▲523.21 ▼0.04684.89 ▼61.0751.72 ▼14.82
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0497.57 ▼13.5242.44 ▼1.65
Featured Items Metabox /wp-admin/options-general.php?page=featured-items-metabox8282.0026.7826.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Featured_Item_Metabox_Plugin::delete_plugin_options() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/featured-item-metabox/inc/plugin-options.php:12

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

readme.txt 88% 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 require attention:
  • Screenshots: These screenshots lack descriptions #0, #0, #0 in featured-item-metabox/assets to your readme.txt
  • Screenshots: Please add images for these screenshots: #1 (The plugin settings), #2 (Posts overview. Featured status can be changed via quickedit, or by simply clicking on the star icon. Dark stars are featured whereas hollow stars are not.), #3 (The metabox when editing an individual post)
Please take inspiration from this readme.txt

featured-item-metabox/featured-item-metabox.php Passed 13 tests

"Featured Item Metabox" version 1.3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
70 characters long description:
Quickly add a metabox to any post type for marking a post as featured.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin341 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3150233298
JavaScript216743

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity27.50
▷ Minimum class complexity12.00
▷ Maximum class complexity43.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin