10% always-valid-lightbox-mod

Code Review | Plugin Name: Always valid lightbox mod

WordPress plugin Plugin Name: Always valid lightbox modscored10%from 54 tests.

About plugin

  • Plugin page: always-valid-ligh...
  • Plugin version: v1.0...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2013
  • Latest release: Oct 23, 2013
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: hb860 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,130 total downloads


Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5747
    Function add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

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

This is a short check of server-side resources used by Plugin Name: Always valid lightbox mod
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.12 ▲4.12
Dashboard /wp-admin3.34 ▲0.0450.76 ▲0.93
Posts /wp-admin/edit.php3.39 ▲0.0344.38 ▼5.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.26 ▼16.13
Media Library /wp-admin/upload.php3.26 ▲0.0336.52 ▲3.98

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: Always valid lightbox mod
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,087 ▲34113.74 ▼0.847.64 ▲5.7740.19 ▼5.36
Dashboard /wp-admin2,222 ▲375.90 ▲0.04110.58 ▼11.0942.10 ▼4.58
Posts /wp-admin/edit.php2,105 ▲162.08 ▲0.0334.71 ▼1.8632.24 ▼2.36
Add New Post /wp-admin/post-new.php1,546 ▲1323.35 ▼0.02653.98 ▼21.6060.70 ▲6.60
Media Library /wp-admin/upload.php1,404 ▲134.25 ▲0.0297.53 ▼4.8241.60 ▼0.77

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/always-valid-lightbox-mod/lightbox.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


Plugin configuration 86% 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 need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: Always valid lightbox mod=== )
Please take inspiration from this readme.txt

always-valid-lightbox-mod/lightbox.php 77% from 13 tests

The main file in "Plugin Name: Always valid lightbox mod" v. v1.0... serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("always-valid-lightbox-mod.php" instead of "lightbox.php")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "v1.0...")
  • Description: The description should be shorter than 140 characters (currently 536 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
Success! There were no dangerous files found in this plugin436 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions10100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin