10% generate-box

Code Review | Generate Box

WordPress plugin Generate Box scored10%from 54 tests.

About plugin

  • Plugin page: generate-box
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 24, 2012
  • Latest release: May 26, 2013
  • Number of updates: 7
  • Update frequency: every 65.3 days
  • Top authors: hishaman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /7,009 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_theme_data is deprecated since version 3.4.0! Use wp_get_theme() instead.

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.92ms] Passed 4 tests

A check of server-side resources used by Generate Box
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.56 ▼4.69
Dashboard /wp-admin3.31 ▲0.0046.32 ▼3.14
Posts /wp-admin/edit.php3.36 ▲0.0052.04 ▲3.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.32 ▼22.88
Media Library /wp-admin/upload.php3.23 ▲0.0037.85 ▲6.41

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Generate Box
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▲0.061.72 ▼0.5542.82 ▼0.33
Dashboard /wp-admin2,203 ▲185.83 ▼0.0595.79 ▼5.2937.72 ▼8.46
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0239.73 ▲0.4934.19 ▼4.15
Add New Post /wp-admin/post-new.php1,542 ▲2823.28 ▲5.59677.17 ▲67.3152.83 ▼0.46
Media Library /wp-admin/upload.php1,391 ▲124.15 ▼0.05101.99 ▼5.0645.91 ▲5.64

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
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-box/include/admin.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/generate-box/generate-box.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-box/include/box.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings page), #2 (Generate Box forms)
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
You can take inspiration from this readme.txt

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

This is the main PHP file of "Generate Box" version 0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
86 characters long description:
Add more functionality to Generate Child Theme and Genesis framework from StudioPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin913 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS512329662
PHP423992251

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 PNG files occupy 0.33MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/box/red/generatebox-badge.png31.17KB14.40KB▼ 53.79%
images/box/blue/generatebox-heading-short.png0.20KB0.36KB0.00%
images/box/arrow.png2.29KB1.52KB▼ 33.87%
images/box/shadow.png22.79KB9.83KB▼ 56.85%
images/box/generatebox-bg.png1.01KB0.20KB▼ 79.75%