77% hiweb-lightbox

Code Review | hiWeb Lightbox

WordPress plugin hiWeb Lightbox scored77%from 54 tests.

About plugin

  • Plugin page: hiweb-lightbox
  • Plugin version: 1.0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Nov 11, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Den Media (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,156 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by hiWeb Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.03 ▼0.37
Dashboard /wp-admin3.32 ▲0.0248.24 ▼3.33
Posts /wp-admin/edit.php3.38 ▲0.0247.47 ▼0.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.31 ▼19.13
Media Library /wp-admin/upload.php3.25 ▲0.0236.40 ▲0.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

hiWeb Lightbox: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲18714.02 ▼0.355.83 ▲3.7539.87 ▼4.36
Dashboard /wp-admin2,221 ▲185.88 ▼0.00110.22 ▲2.8242.14 ▲2.00
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0342.41 ▲4.5236.17 ▼2.00
Add New Post /wp-admin/post-new.php1,545 ▲1423.11 ▼0.09612.23 ▼76.5256.87 ▲7.61
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0397.24 ▼17.6945.23 ▼0.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hiweb-lightbox/include/templates/pswp.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-lightbox/include/hooks.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-lightbox/include/hooks.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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:
  • Donate link: Invalid url: ""
  • Tags: You are using too many tags: 23 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #2 (Just Add image on WYSIWYG editor for hiWeb Lightbox), #3 (Set up link to media file (important!)), #4 (Add gallery on WYSIWYG editor for hiWeb Lightbox), #5 (Its all...easy and simple!)
You can take inspiration from this readme.txt

hiweb-lightbox/hiweb-lightbox.php Passed 13 tests

"hiWeb Lightbox" version 1.0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
26 characters long description:
Auto-open all in Lightbox

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
No dangerous file extensions were detected4,712 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript59524083,345
PHP14209452886
CSS29487480
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity29.62
▷ Minimum class complexity4.00
▷ Maximum class complexity104.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods6692.96%
▷ Protected methods45.63%
▷ Private methods11.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 2.28MB with 1.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/photoswipe/default-skin/default-skin.png0.53KB0.72KB0.00%
screenshot-1.png606.43KB204.23KB▼ 66.32%
screenshot-2.png376.82KB129.97KB▼ 65.51%
screenshot-5.png605.79KB142.34KB▼ 76.50%
screenshot-4.png520.44KB141.50KB▼ 72.81%