84% f13-lightbox

Code Review | F13 Lightbox

WordPress plugin F13 Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: f13-lightbox
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2021
  • Latest release: Oct 23, 2021
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: f13dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.57ms] Passed 4 tests

This is a short check of server-side resources used by F13 Lightbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.40 ▼4.19
Dashboard /wp-admin3.31 ▲0.0145.53 ▼2.70
Posts /wp-admin/edit.php3.36 ▲0.0148.40 ▼5.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.06 ▼10.22
Media Library /wp-admin/upload.php3.23 ▲0.0135.57 ▲2.09

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

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

Browser metrics Passed 4 tests

F13 Lightbox: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12613.57 ▼0.829.60 ▲7.4741.46 ▼9.83
Dashboard /wp-admin2,209 ▲184.85 ▼0.08110.57 ▲7.8641.21 ▼1.44
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0039.01 ▼4.6934.46 ▼3.25
Add New Post /wp-admin/post-new.php1,528 ▼523.28 ▲0.11662.08 ▲36.4156.75 ▼3.26
Media Library /wp-admin/upload.php1,391 ▲64.21 ▲0.0296.63 ▼3.7243.30 ▼2.16

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/f13-lightbox/f13-lightbox.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/f13-lightbox/f13-lightbox.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/f13-lightbox/f13-lightbox.php on line 14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: A description for screenshot #1 is missing in f13-lightbox/assets to your readme.txt
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "F13 Lightbox" version 1.0.0
56 characters long description:
Convert page/post content images to lightbox style links

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected248 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1190142
PHP212970
SVG30024
CSS10012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.00
▷ Minimum class complexity4.00
▷ Maximum class complexity6.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin