89% css-only-lightbox

Code Review | CSS-Only Lightbox

WordPress plugin CSS-Only Lightbox scored89%from 54 tests.

About plugin

  • Plugin page: css-only-lightbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2016
  • Latest release: Oct 11, 2016
  • Number of updates: 3
  • Update frequency: every 58.7 days
  • Top authors: dan-jones (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /820 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: ▼10.38ms] Passed 4 tests

A check of server-side resources used by CSS-Only Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.07 ▲1.06
Dashboard /wp-admin3.33 ▼0.0245.39 ▼17.59
Posts /wp-admin/edit.php3.38 ▲0.0248.05 ▲2.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.12 ▼23.21
Media Library /wp-admin/upload.php3.25 ▲0.0234.62 ▼1.76

Server storage [IO: ▲0.05MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

CSS-Only Lightbox: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼0.701.65 ▼0.2443.32 ▲0.45
Dashboard /wp-admin2,209 ▲215.86 ▼0.12109.59 ▼3.0640.30 ▼5.53
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0439.14 ▲2.9735.61 ▲0.94
Add New Post /wp-admin/post-new.php1,514 ▼1417.49 ▼0.73677.71 ▲66.8552.36 ▲0.05
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.1895.53 ▼4.6141.73 ▼2.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === css-only-lightbox === )
You can take inspiration from this readme.txt

css-only-lightbox/css-only-lighbox.php 85% from 13 tests

Analyzing the main PHP file in "CSS-Only Lightbox" version 1.0
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("css-only-lightbox.php" instead of "css-only-lighbox.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 236 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected326 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1229141
PHP21828104
JavaScript13249
Markdown112032

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected