84% light-modal-block

Code Review | Light Modal Block

WordPress plugin Light Modal Block scored84%from 54 tests.

About plugin

  • Plugin page: light-modal-block
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Jun 15, 2023
  • Latest release: Aug 2, 2023
  • Number of updates: 14
  • Update frequency: every 3.4 days
  • Top authors: dkjensen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /361 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Light Modal Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.07 ▼0.14
Dashboard /wp-admin3.32 ▲0.0243.22 ▼7.14
Posts /wp-admin/edit.php3.37 ▲0.0249.53 ▲4.68
Add New Post /wp-admin/post-new.php5.86 ▼0.0391.11 ▼2.04
Media Library /wp-admin/upload.php3.24 ▲0.0235.02 ▲1.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 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

A check of browser resources used by Light Modal Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6814.43 ▲0.051.87 ▼0.0843.15 ▼3.52
Dashboard /wp-admin2,209 ▲215.86 ▲1.01103.22 ▼14.2840.37 ▼4.74
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0340.49 ▲0.3135.63 ▼5.42
Add New Post /wp-admin/post-new.php6,361 ▲4,84728.44 ▲10.96878.96 ▲192.8959.22 ▲5.06
Media Library /wp-admin/upload.php1,385 ▼64.20 ▲0.03103.29 ▲8.2444.28 ▼0.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/light-modal-block/light-modal-block.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: lightbox, gutenberg, full-site-editing, block, modal...

light-modal-block/light-modal-block.php 92% from 13 tests

"Light Modal Block" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("6.2" instead of "6.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin105 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON10094
PHP31147
CSS2002
JavaScript2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin