84% simple-colorbox

Code Review | Simple Colorbox

WordPress plugin Simple Colorbox scored84%from 54 tests.

About plugin

  • Plugin page: simple-colorbox
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4
  • WordPress version: 6.3.1
  • First release: Apr 16, 2012
  • Latest release: Apr 29, 2015
  • Number of updates: 21
  • Update frequency: every 52.8 days
  • Top authors: ryanhellyer (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

3,000+ active /39,194 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Simple Colorbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.35 ▲1.89
Dashboard /wp-admin3.33 ▼0.0146.77 ▼12.46
Posts /wp-admin/edit.php3.38 ▲0.0353.00 ▲4.99
Add New Post /wp-admin/post-new.php5.91 ▲0.03124.28 ▲15.54
Media Library /wp-admin/upload.php3.25 ▲0.0335.79 ▲1.41

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Colorbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲18813.56 ▼0.8211.86 ▲10.2443.29 ▼0.12
Dashboard /wp-admin2,198 ▲185.58 ▼0.0190.15 ▲0.7641.44 ▼2.15
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0238.88 ▼0.9036.71 ▼0.42
Add New Post /wp-admin/post-new.php1,526 ▼722.95 ▼0.16675.34 ▼25.4456.20 ▲4.60
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.0198.98 ▼5.7843.27 ▼0.95

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-colorbox/index.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

simple-colorbox/index.php 92% from 13 tests

The principal PHP file in "Simple Colorbox" v. 1.6.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-colorbox.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin277 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS52365201
PHP1257275
JavaScript1061

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
27 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/theme4/images/ie6/borderBottomRight.png0.46KB0.54KB0.00%
themes/theme1/images/ie6/borderBottomLeft.png0.21KB0.20KB▼ 4.19%
themes/theme1/images/loading_background.png0.15KB0.15KB▼ 0.64%
themes/theme4/images/border1.png1.03KB0.82KB▼ 20.34%
themes/theme4/images/ie6/borderMiddleLeft.png0.14KB0.16KB0.00%