84% zior-lightbox

Code Review | ZIOR Lightbox

WordPress plugin ZIOR Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: zior-lightbox
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Feb 4, 2023
  • Number of updates: 12
  • Update frequency: every 3.2 days
  • Top authors: reygcalantaol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /203 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by ZIOR Lightbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.32 ▲0.26
Dashboard /wp-admin3.33 ▼0.0146.13 ▼13.67
Posts /wp-admin/edit.php3.38 ▲0.0343.91 ▼0.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.91 ▼9.01
Media Library /wp-admin/upload.php3.25 ▲0.0234.44 ▲2.13
ZIOR Lightbox /wp-admin/options-general.php?page=zior_lightbox_settings3.2229.38

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ZIOR Lightbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲20713.84 ▼0.5112.63 ▲11.0647.99 ▲7.17
Dashboard /wp-admin2,199 ▲195.55 ▼0.1181.80 ▼4.8936.28 ▼3.17
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0435.28 ▼1.1233.44 ▲1.04
Add New Post /wp-admin/post-new.php1,539 ▲1318.21 ▼5.29612.47 ▼73.8466.22 ▲12.08
Media Library /wp-admin/upload.php1,401 ▲14.21 ▼0.01105.49 ▲5.0045.18 ▼0.92
ZIOR Lightbox /wp-admin/options-general.php?page=zior_lightbox_settings8811.9922.2726.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zior-lightbox/includes/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zior-lightbox/includes/actions.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/zior-lightbox/zr-lightbox.php:73

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: lightbox, auto lightbox

zior-lightbox/zr-lightbox.php 92% from 13 tests

The entry point to "ZIOR Lightbox" version 0.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zior-lightbox.php" instead of "zr-lightbox.php")

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
No dangerous file extensions were detected159 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32269157
CSS1001
JavaScript1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
build/images/close.0cfd6489.0cfd6489.png0.27KB0.29KB0.00%
build/images/next.62074ac7.62074ac7.png1.32KB1.58KB0.00%
build/images/prev.0edc57cc.0edc57cc.png1.33KB1.59KB0.00%