90% conditional-simple-colorbox

Code Review | Conditional Simple Colorbox

WordPress plugin Conditional Simple Colorbox scored90%from 54 tests.

About plugin

  • Plugin page: conditional-simpl...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.2.2
  • WordPress version: 6.3.1
  • First release: May 16, 2015
  • Latest release: May 16, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dimadin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.85ms] Passed 4 tests

Analyzing server-side resources used by Conditional Simple Colorbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.12 ▼3.15
Dashboard /wp-admin3.31 ▲0.0050.02 ▲0.32
Posts /wp-admin/edit.php3.36 ▲0.0049.38 ▼8.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.45 ▼13.20
Media Library /wp-admin/upload.php3.23 ▲0.0035.81 ▼2.90

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Conditional Simple Colorbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.17 ▼0.111.78 ▲0.0539.96 ▼2.54
Dashboard /wp-admin2,198 ▲185.63 ▲0.0686.32 ▼4.4036.96 ▼2.53
Posts /wp-admin/edit.php2,097 ▼02.01 ▼0.0937.25 ▼2.2933.59 ▼1.95
Add New Post /wp-admin/post-new.php1,526 ▼222.92 ▼0.18615.57 ▼29.5094.43 ▲16.85
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.08103.83 ▲7.9642.17 ▼2.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: simple colorbox, colorbox

conditional-simple-colorbox/conditional-simple-colorbox.php Passed 13 tests

The entry point to "Conditional Simple Colorbox" version 1.0 is a PHP file that has certain tags in its header comment area
55 characters long description:
Add a Colorbox to footer of your site only when needed.

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
Success! There were no dangerous files found in this plugin49 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21910049

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.35
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin