78% wp-feature-box

Code Review | WP Feature Box

WordPress plugin WP Feature Box scored 78% from 54 tests.

About plugin

  • Plugin page: wp-feature-box
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2013
  • Latest release: Feb 6, 2015
  • Number of updates: 14
  • Update frequency: every 30.5 days
  • Top authors: miguelpeixe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 4,135 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.79MB] [CPU: ▲10.68ms] Passed 4 tests

Analyzing server-side resources used by WP Feature Box
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.98 ▲1.5253.55 ▲2.56
Dashboard /wp-admin5.18 ▲1.8858.91 ▲9.03
Posts /wp-admin/edit.php5.24 ▲1.8861.74 ▲9.86
Add New Post /wp-admin/post-new.php7.82 ▲1.93113.50 ▲26.13
Media Library /wp-admin/upload.php5.12 ▲1.8953.59 ▲21.27
Export /wp-admin/edit.php?post_type=acf&page=acf-export5.0941.31
Custom Fields /wp-admin/edit.php?post_type=acf5.2544.04
Add-ons /wp-admin/edit.php?post_type=acf&page=acf-addons5.0840.77
Settings /wp-admin/edit.php?post_type=wp-feature-box&page=wfb-settings4.9939.05
Add feature item /wp-admin/post-new.php?post_type=wp-feature-box5.3261.10
Feature box /wp-admin/edit.php?post_type=wp-feature-box5.1545.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 162 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
acf_version
db_upgraded

Browser metrics Passed 4 tests

WP Feature Box: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,082 ▲33614.20 ▼0.1813.93 ▲12.2445.59 ▲6.13
Dashboard /wp-admin2,286 ▲1045.10 ▼0.77112.60 ▲7.6140.63 ▼0.38
Posts /wp-admin/edit.php2,171 ▲792.32 ▲0.2739.90 ▼2.7734.90 ▼2.37
Add New Post /wp-admin/post-new.php6,968 ▲5,44926.05 ▲2.891,009.01 ▲322.9442.69 ▼11.57
Media Library /wp-admin/upload.php1,471 ▲804.44 ▲0.20100.12 ▼5.0571.94 ▲25.94
Export /wp-admin/edit.php?post_type=acf&page=acf-export1,0111.9335.7831.32
Custom Fields /wp-admin/edit.php?post_type=acf1,2442.3137.3933.36
Add-ons /wp-admin/edit.php?post_type=acf&page=acf-addons1,0762.1130.5530.15
Settings /wp-admin/edit.php?post_type=wp-feature-box&page=wfb-settings9211.9428.7029.99
Add feature item /wp-admin/post-new.php?post_type=wp-feature-box2,8468.23172.1653.57
Feature box /wp-admin/edit.php?post_type=wp-feature-box1,1382.2531.2932.86

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • acf_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=wp-feature-box&page=wfb-settings
    • > Notice in wp-content/plugins/wp-feature-box/admin.php+98
    Undefined index: wfb_settings
    • > GET request to /wp-admin/edit.php?post_type=wp-feature-box&page=wfb-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=wp-feature-box&page=wfb-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-feature-box/includes/acf/core/controllers/location.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/wp-feature-box/includes/acf/core/fields/post_object.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-feature-box/includes/acf/core/views/meta_box_options.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'acf_Field' not found in wp-content/plugins/wp-feature-box/includes/acf/add-ons/acf-website-field/website_url.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Feature_Box' not found in wp-content/plugins/wp-feature-box/tinymce.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-feature-box/includes/acf/core/controllers/upgrade.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/wp-feature-box/includes/acf/core/fields/radio.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/wp-feature-box/includes/acf/core/fields/file.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-feature-box/includes/acf/core/controllers/everything_fields.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/wp-feature-box/includes/acf/core/fields/taxonomy.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

wp-feature-box/wp-feature-box.php Passed 13 tests

The primary PHP file in "WP Feature Box" version 0.1.3 is used by WordPress to initiate all plugin functionality
37 characters long description:
A simple WordPress feature box plugin

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
Everything looks great! No dangerous files found in this plugin31,651 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PO File155,7698,56012,675
PHP514,1714,80710,198
JavaScript253,4862,5956,126
CSS67183842,551
Markdown3510101

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.98
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes00.00%
▷ Concrete classes46100.00%
▷ Final classes00.00%
Methods340
▷ Static methods61.76%
▷ Public methods33197.35%
▷ Protected methods82.35%
▷ Private methods10.29%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
27 PNG files occupy 0.25MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/acf/screenshot-4.png25.14KB5.24KB▼ 79.16%
includes/acf/add-ons/acf-website-field/front-end.png8.56KB3.30KB▼ 61.50%
includes/acf/images/arrows.png0.24KB0.24KB0.00%
includes/acf/core/fields/date_picker/images/ui-bg_flat_55_5bc6f5_40x100.png0.21KB0.08KB▼ 59.15%
includes/acf/images/sprite.png5.94KB2.82KB▼ 52.51%