10% sandbox

Code Review | Sandbox

WordPress plugin Sandbox scored10%from 54 tests.

About plugin

  • Plugin page: sandbox
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Mar 29, 2014
  • Number of updates: 9
  • Update frequency: every 6.9 days
  • Top authors: barteled (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active /13,631 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
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/sandbox/sandbox-plugin.php+119
    Undefined index: path

Server metrics [RAM: ▼1.04MB] [CPU: ▼36.52ms] Passed 4 tests

Server-side resources used by Sandbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.93 ▼0.5315.69 ▼27.67
Dashboard /wp-admin2.97 ▼0.3419.98 ▼28.75
Posts /wp-admin/edit.php2.97 ▼0.3929.40 ▼15.43
Add New Post /wp-admin/post-new.php2.97 ▼2.9217.41 ▼69.29
Media Library /wp-admin/upload.php2.97 ▼0.2615.28 ▼20.38

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 2 files (0.96KB) illegally modified outside of "wp-content/plugins/sandbox/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (new file) sandbox/.empty
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
sandboxes

Browser metrics Passed 4 tests

An overview of browser requirements for Sandbox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.22 ▼1.561.70 ▼0.2437.75 ▼9.92
Dashboard /wp-admin2,222 ▲344.87 ▼0.03107.53 ▼9.4437.08 ▼10.62
Posts /wp-admin/edit.php2,105 ▲162.00 ▲0.0037.36 ▲0.6633.71 ▼3.91
Add New Post /wp-admin/post-new.php1,547 ▲3323.46 ▲5.94669.39 ▲22.5351.41 ▼12.49
Media Library /wp-admin/upload.php1,401 ▲134.20 ▼0.0491.99 ▼7.0443.31 ▼0.58

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/sandbox/sandbox-plugin.php+191
    Undefined index: debug
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • sandboxes

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sandbox/sandbox-ajax.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/sandbox/admin-table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sandbox/admin-menu.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sandbox/admin-table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sandbox/admin-errors.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sandbox/admin-errors.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/sandbox/admin-table.php on line 2

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: test, sandbox, verify, offline, regression

sandbox/sandbox-plugin.php 92% from 13 tests

The entry point to "Sandbox" version 0.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sandbox.php" instead of "sandbox-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,088 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP72261411,081
CSS1427
JavaScript1200

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.00
▷ Minimum class complexity2.00
▷ Maximum class complexity80.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods39.68%
▷ Public methods1858.06%
▷ Protected methods00.00%
▷ Private methods1341.94%
Functions21
▷ Named functions21100.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
There are no PNG files in this plugin