83% spicebox

Code Review | Spice Box

WordPress plugin Spice Box scored83%from 54 tests.

About plugin

  • Plugin page: spicebox
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 16, 2018
  • Latest release: Jul 5, 2023
  • Number of updates: 112
  • Update frequency: every 17.6 days
  • Top authors: spicethemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40,000+ active /974,857 total downloads

Benchmarks

Plugin footprint 83% 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.08MB] [CPU: ▼13.51ms] Passed 4 tests

A check of server-side resources used by Spice Box
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.51 ▼3.12
Dashboard /wp-admin3.40 ▲0.0548.14 ▼19.75
Posts /wp-admin/edit.php3.51 ▲0.1548.08 ▼7.62
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.64 ▼23.55
Media Library /wp-admin/upload.php3.32 ▲0.0940.51 ▲0.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Spice Box
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.371.48 ▼0.2440.09 ▼1.41
Dashboard /wp-admin2,195 ▲145.63 ▼0.0887.08 ▼19.2538.75 ▼3.52
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0140.71 ▼0.2237.35 ▲0.86
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.64665.96 ▼14.0249.98 ▼6.37
Media Library /wp-admin/upload.php1,397 ▼64.15 ▼0.0798.30 ▼4.4644.69 ▲1.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 211× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spicebox/inc/spiko/sections/spiko-slider-section.php:5
    • > PHP Warning
      Use of undefined constant SPICEB_PLUGIN_URL - assumed 'SPICEB_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/spicebox/inc/honeypress/default-pages/upload-media.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spicebox/inc/cloudpress/features/feature-testimonial-section.php:164
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/spicebox/inc/innofit/customizer/subscriber-section.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spicebox/inc/wpkites/sections/wpkites-testimonial-section.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spicebox/inc/innofit/sections/innofit-contact-section.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_insert_post() in wp-content/plugins/spicebox/inc/innofit/default-pages/home-page.php:14
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/spicebox/inc/busicare/customizer/testimonial-section.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/spicebox/inc/wpblack/default-pages/upload-media.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/spicebox/inc/innofit/customizer/about-section.php:3

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

spicebox/spicebox.php Passed 13 tests

"Spice Box" version 2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Enhances SpiceThemes with extra functionality.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected66,075 lines of code in 333 files:
LanguageFilesBlank linesComment linesLines of code
PHP27510,43618,23553,589
CSS303772425,632
JavaScript263472833,969
SVG1002,671
Markdown1680214

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity68.78
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes22.90%
▷ Concrete classes6797.10%
▷ Final classes00.00%
Methods1,307
▷ Static methods19715.07%
▷ Public methods89768.63%
▷ Protected methods181.38%
▷ Private methods39229.99%
Functions438
▷ Named functions43699.54%
▷ Anonymous functions20.46%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
72 PNG files occupy 0.50MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/innofit/images/bg-pattern/bg-img4.png1.29KB1.30KB0.00%
inc/honeypress/images/honeybee-logo.png3.97KB2.48KB▼ 37.62%
inc/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
inc/honeypress/images/honeypress-dark.png3.32KB3.40KB0.00%
inc/controls/customizer-alpha-color-picker/css/transparency-grid.png2.58KB2.80KB0.00%