84% simplest-colorbox

Code Review | Simplest Colorbox

WordPress plugin Simplest Colorbox scored84%from 54 tests.

About plugin

  • Plugin page: simplest-colorbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2013
  • Latest release: Mar 20, 2013
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: simpson-fan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,347 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.73ms] Passed 4 tests

Server-side resources used by Simplest Colorbox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.87 ▼3.86
Dashboard /wp-admin3.31 ▲0.0143.00 ▼7.27
Posts /wp-admin/edit.php3.36 ▲0.0045.68 ▼0.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.49 ▲3.27
Media Library /wp-admin/upload.php3.23 ▲0.0036.61 ▼3.66

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Simplest Colorbox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20813.64 ▼0.7512.04 ▲10.4243.03 ▼0.47
Dashboard /wp-admin2,203 ▲155.77 ▲0.8795.25 ▼24.8842.99 ▼0.88
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0335.77 ▼0.0233.50 ▼12.24
Add New Post /wp-admin/post-new.php1,533 ▲1923.12 ▲5.40659.03 ▼14.7560.32 ▲4.72
Media Library /wp-admin/upload.php1,388 ▼04.17 ▲0.1196.18 ▼17.8740.15 ▼10.66

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

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
Even though everything seems fine, this is not an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simplest-colorbox/simplest-colorbox.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: images, colorbox, lightbox, slideshow

simplest-colorbox/simplest-colorbox.php Passed 13 tests

This is the main PHP file of "Simplest Colorbox" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
A configuration-free colorbox plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected82 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1146750
CSS111031
JavaScript1051

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
theme/images/controls.png0.56KB0.57KB0.00%