78% lightbox-content-images-wpshare247

Code Review | Lightbox content images - WPSHARE247

WordPress plugin Lightbox content images - WPSHARE247 scored78%from 54 tests.

About plugin

  • Plugin page: lightbox-content-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Jul 20, 2021
  • Latest release: Jul 30, 2021
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: website366 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,838 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.59ms] Passed 4 tests

An overview of server-side resources used by Lightbox content images - WPSHARE247
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.56 ▼5.01
Dashboard /wp-admin3.35 ▲0.0554.11 ▼1.25
Posts /wp-admin/edit.php3.47 ▲0.1153.95 ▲2.65
Add New Post /wp-admin/post-new.php5.93 ▲0.05115.50 ▲12.69
Media Library /wp-admin/upload.php3.28 ▲0.0537.83 ▲1.27
Configure Lightbox Images /wp-admin/options-general.php?page=ws247-lcimages-options3.2535.17

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lightbox content images - WPSHARE247
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲12513.82 ▼0.348.76 ▲6.4739.10 ▼4.72
Dashboard /wp-admin2,213 ▲284.97 ▼0.84114.88 ▼10.0339.01 ▼1.97
Posts /wp-admin/edit.php2,100 ▲82.05 ▲0.0343.60 ▲4.4635.07 ▲1.68
Add New Post /wp-admin/post-new.php1,539 ▲623.35 ▲0.25664.80 ▼45.6165.28 ▲9.04
Media Library /wp-admin/upload.php1,396 ▲84.25 ▲0.04108.68 ▼1.4144.71 ▼3.36
Configure Lightbox Images /wp-admin/options-general.php?page=ws247-lcimages-options9252.3631.5626.22

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ws247-lcimages-options
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Ws247_lcimages_Helper::ws247_lcimages_init_load_post_types() should not be called statically

SRP 50% 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
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lightbox-content-images-wpshare247/inc/option-form-template.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lightbox-content-images-wpshare247/inc/tabs/tab_pro_general.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lightbox-content-images-wpshare247/inc/class.setting.page.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lightbox-content-images-wpshare247/inc/define.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Ws247_lcimages_Setting' not found in wp-content/plugins/lightbox-content-images-wpshare247/inc/theme_functions.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/lightbox-content-images-wpshare247/assets/addmin_footer_js.php:9
    • > PHP Warning
      Use of undefined constant WS247_LCIMAGES_SETTING_PAGE_SLUG - assumed 'WS247_LCIMAGES_SETTING_PAGE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/lightbox-content-images-wpshare247/inc/class.setting.page.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === lightbox-content-images-wpshare247 === )
You can take inspiration from this readme.txt

lightbox-content-images-wpshare247/lightbox-content-images-wpshare247.php 92% from 13 tests

Analyzing the main PHP file in "Lightbox content images - WPSHARE247" version 1.0
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin9,537 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,3641,2937,677
CSS8279411,537
PHP95741284
PO File112139

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity5.00
▷ Maximum class complexity7.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin