10% wp-crobox

Code Review | Name: WP CroBox

WordPress plugin Name: WP CroBoxscored10%from 54 tests.

About plugin

  • Plugin page: wp-crobox
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Mar 23, 2017
  • Latest release: Oct 27, 2018
  • Number of updates: 8
  • Update frequency: every 72.5 days
  • Top authors: neshable (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /452 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wp-crobox/includes/class-wp-crobox.php+183
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.85ms] Passed 4 tests

Analyzing server-side resources used by Name: WP CroBox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.50 ▼36.06
Dashboard /wp-admin2.05 ▼1.265.14 ▼46.34
Posts /wp-admin/edit.php2.05 ▼1.315.15 ▼43.36
Add New Post /wp-admin/post-new.php2.05 ▼3.845.05 ▼81.62
Media Library /wp-admin/upload.php2.05 ▼1.186.25 ▼25.32
WP CroBox /wp-admin/options-general.php?page=wp-crobox2.055.54

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
wp-crobox
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Name: WP CroBox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.73 ▲0.182.08 ▲0.2244.18 ▼1.61
Dashboard /wp-admin2,224 ▲445.79 ▲0.0990.69 ▲4.8939.22 ▼8.05
Posts /wp-admin/edit.php2,113 ▲132.31 ▲0.2738.52 ▲1.7233.56 ▼2.39
Add New Post /wp-admin/post-new.php1,554 ▲2823.25 ▲0.31667.52 ▲27.8236.02 ▼32.10
Media Library /wp-admin/upload.php1,433 ▲334.36 ▲0.1692.39 ▼10.4641.14 ▼3.80
WP CroBox /wp-admin/options-general.php?page=wp-crobox1,3422.4459.9633.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-crobox/includes/class-wp-crobox.php+183
    Undefined index: main_switch
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-crobox
    • > Notice in wp-content/plugins/wp-crobox/admin/partials/wp-crobox-admin-display.php+38
    Undefined index: main_switch
    • > GET request to /wp-admin/options-general.php?page=wp-crobox
    • > Notice in wp-content/plugins/wp-crobox/admin/partials/wp-crobox-admin-display.php+42
    Undefined index: button_url
    • > GET request to /wp-admin/options-general.php?page=wp-crobox
    • > Notice in wp-content/plugins/wp-crobox/admin/partials/wp-crobox-admin-display.php+43
    Undefined index: enable_footer
    • > GET request to /wp-admin/options-general.php?page=wp-crobox
    • > Notice in wp-content/plugins/wp-crobox/admin/partials/wp-crobox-admin-display.php+44
    Undefined index: footer_text

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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-crobox/public/partials/wp-crobox-public-css.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-crobox/admin/partials/wp-crobox-admin-contact.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-crobox/admin/partials/wp-crobox-admin-colors.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-crobox/admin/partials/wp-crobox-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-crobox/public/partials/wp-crobox-public-display.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Contributors not specified
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Name: WP CroBox=== )
You can take inspiration from this readme.txt

wp-crobox/wp-crobox.php Passed 13 tests

The principal PHP file in "Name: WP CroBox" v. 1.0.0 is loaded by WordPress automatically on each request
48 characters long description:
Smart and customizable pop-up box for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected546 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15211549375
CSS2114105
JavaScript215366

PHP code Passed 2 tests

This is a short overview 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.07
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin