68% featured-box

Code Review | Featured Box

WordPress plugin Featured Box scored 68% from 54 tests.

About plugin

  • Plugin page: featured-box
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.6.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2013
  • Latest release: Sep 26, 2013
  • Number of updates: 8
  • Update frequency: every 24.1 days
  • Top authors: mch0lic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,192 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.86MB] [CPU: ▼56.78ms] Passed 4 tests

This is a short check of server-side resources used by Featured Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.344.62 ▼55.84
Dashboard /wp-admin2.14 ▼1.166.03 ▼41.39
Posts /wp-admin/edit.php2.14 ▼1.216.09 ▼42.74
Add New Post /wp-admin/post-new.php2.14 ▼3.746.50 ▼87.13
Media Library /wp-admin/upload.php2.14 ▼1.085.93 ▼28.86
All Images /wp-admin/edit.php?post_type=featuredbox2.155.91
Groups /wp-admin/edit-tags.php?taxonomy=featuredboxgroup&post_type=featuredbox2.156.03
Add New /wp-admin/post-new.php?post_type=featuredbox2.157.40

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
featuredbox_version
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Box
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18714.03 ▼0.625.06 ▲2.6639.21 ▼20.30
Dashboard /wp-admin2,246 ▲584.88 ▼0.98100.92 ▼19.7438.39 ▼8.57
Posts /wp-admin/edit.php2,132 ▲432.01 ▼0.0236.29 ▼3.6437.07 ▼8.33
Add New Post /wp-admin/post-new.php1,555 ▲3523.38 ▲0.21597.02 ▼46.8158.74 ▼18.29
Media Library /wp-admin/upload.php1,434 ▲464.24 ▲0.0499.50 ▼12.8444.74 ▼5.70
All Images /wp-admin/edit.php?post_type=featuredbox1,0962.0932.4230.81
Groups /wp-admin/edit-tags.php?taxonomy=featuredboxgroup&post_type=featuredbox1,3082.1429.6925.82
Settings /wp-admin/featuredbox_settings.php260.440.1213.08
Add New /wp-admin/post-new.php?post_type=featuredbox1,7713.6074.1336.64
Help /wp-admin/featuredbox_help.php260.440.085.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the featuredbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • featuredbox_version
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=featuredbox
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the featuredbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=featuredbox
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the slideshow handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/post-new.php?post_type=featuredbox
    • > User notice in wp-includes/functions.php+5905
    Function map_meta_cap was called incorrectly. When checking for the edit_post capability, you must always check it against a specific post. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/featuredbox_settings.php
    • > Network (severe)
    wp-admin/featuredbox_settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/featuredbox_help.php
    • > Network (severe)
    wp-admin/featuredbox_help.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Plugin configurations), #2 (Slider image details)
The official readme.txt might help

featured-box/featured-box.php Passed 13 tests

The entry point to "Featured Box" version 2.0.0 is a PHP file that has certain tags in its header comment area
74 characters long description:
Featured image slider based on jquery.slideShow (1.0.7) by Marcel Eichner.

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
Success! There were no dangerous files found in this plugin618 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP66715375
PO File284128204
JavaScript101534
CSS1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.74KB7.22KB▼ 69.58%
screenshot-2.png133.02KB45.56KB▼ 65.75%