90% pwp-lytebox

Code Review | PWP Lytebox

WordPress plugin PWP Lytebox scored 90% from 54 tests.

About plugin

  • Plugin page: pwp-lytebox
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Oct 24, 2015
  • Number of updates: 50
  • Update frequency: every 5.4 days
  • Top authors: polkan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,845 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.69ms] Passed 4 tests

Analyzing server-side resources used by PWP Lytebox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.14 ▼1.88
Dashboard /wp-admin3.36 ▲0.0644.69 ▼5.81
Posts /wp-admin/edit.php3.41 ▲0.0650.70 ▲2.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.91 ▼4.29
Media Library /wp-admin/upload.php3.28 ▲0.0631.86 ▼2.76
PWP-Lytebox /wp-admin/options-general.php?page=pwpl3.2530.67

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 86 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
pwpl_resizespeed
widget_recent-comments
widget_theysaidso_widget
pwpl_colortheme
db_upgraded
widget_recent-posts
pwpl_autogroup

Browser metrics Passed 4 tests

An overview of browser requirements for PWP Lytebox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲20014.24 ▼0.5219.52 ▲17.8043.25 ▲0.01
Dashboard /wp-admin2,207 ▲225.80 ▲0.7794.73 ▼20.9038.88 ▼8.59
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0239.49 ▲2.7034.53 ▲0.14
Add New Post /wp-admin/post-new.php1,536 ▼623.38 ▲5.17597.86 ▼1.1153.69 ▲1.76
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0293.53 ▼5.9942.87 ▼1.12
PWP-Lytebox /wp-admin/options-general.php?page=pwpl8602.0325.1743.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • pwpl_autogroup
    • pwpl_resizespeed
    • can_compress_scripts
    • pwpl_colortheme
    • 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 shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: lytebox, modal window images, light box, popup images, lightbox

pwp-lytebox/index.php 92% from 13 tests

Analyzing the main PHP file in "PWP Lytebox" version 1.3.2
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("pwp-lytebox.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,359 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221231,948
PHP23779182
CSS1192171
PO File1192458

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
74 PNG files occupy 0.12MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lytebox/images/close_orange.png1.71KB1.41KB▼ 17.65%
lytebox/images/pause_red.png1.60KB1.43KB▼ 10.47%
lytebox/images/info.png2.26KB1.59KB▼ 29.71%
lytebox/images/next_green_off.png1.63KB1.43KB▼ 12.25%
lytebox/images/close_red.png1.69KB1.41KB▼ 16.47%