84% sandcage

Code Review | SandCage

WordPress plugin SandCage scored 84% from 54 tests.

About plugin

  • Plugin page: sandcage
  • Plugin version: 0.1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7
  • WordPress version: 6.3.1
  • First release: Nov 23, 2016
  • Latest release: Dec 31, 2017
  • Number of updates: 16
  • Update frequency: every 25.2 days
  • Top authors: sandcage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,653 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.46ms] Passed 4 tests

Server-side resources used by SandCage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.73 ▼1.32
Dashboard /wp-admin3.33 ▲0.0244.51 ▼0.65
Posts /wp-admin/edit.php3.38 ▲0.0247.82 ▲2.92
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.79 ▲4.87
Media Library /wp-admin/upload.php3.38 ▲0.1540.80 ▲6.94
Media Library /wp-admin/admin.php?page=sandcage/my_assets.php3.2431.81
Settings /wp-admin/admin.php?page=SandCage3.2236.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SandCage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲5513.39 ▼1.011.71 ▲0.0643.28 ▼1.25
Dashboard /wp-admin2,228 ▲225.11 ▼0.65101.83 ▲3.0079.80 ▲39.12
Posts /wp-admin/edit.php2,111 ▲252.03 ▲0.0139.50 ▲5.5236.09 ▲4.13
Add New Post /wp-admin/post-new.php1,537 ▲1723.23 ▲0.16732.99 ▲33.8354.73 ▼15.48
Media Library /wp-admin/upload.php1,448 ▲574.19 ▼0.0198.12 ▼3.6171.41 ▲23.82
Media Library /wp-admin/admin.php?page=sandcage/my_assets.php7802.0925.9721.93
Settings /wp-admin/admin.php?page=SandCage8581.6927.6230.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sandcage/sandcage.php:102
    • > PHP Notice
      Undefined variable: wpSandCage in wp-content/plugins/sandcage/my_assets.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_sandcage_my_assets_iframe() on null in wp-content/plugins/sandcage/my_assets.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can take inspiration from this readme.txt

sandcage/sandcage.php Passed 13 tests

"SandCage" version 0.1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
129 characters long description:
SandCage Plugin to integrate with your SandCage account. Manage your Files and Speed up your Website. Process, Store and Deliver.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,147 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3104277840
JavaScript1220238
CSS12069

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity82.00
▷ Minimum class complexity6.00
▷ Maximum class complexity158.00
Average method complexity7.23
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo60x40.png2.27KB2.26KB0.30%
images/help.png0.87KB0.77KB▼ 11.10%
images/logo60.png2.56KB2.55KB0.23%
images/favico_16.png0.56KB0.74KB0.00%
images/logo.png3.06KB3.04KB▼ 0.64%