90% modal-block

Code Review | Modal Guten Block

WordPress plugin Modal Guten Block scored90%from 54 tests.

About plugin

  • Plugin page: modal-block
  • Plugin version: 2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 2, 2019
  • Latest release: Oct 3, 2023
  • Number of updates: 26
  • Update frequency: every 58.1 days
  • Top authors: merbmerb (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /27,333 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Modal Guten Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.29 ▼7.72
Dashboard /wp-admin3.32 ▲0.0146.87 ▼6.45
Posts /wp-admin/edit.php3.37 ▲0.0146.32 ▲0.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.47 ▼18.22
Media Library /wp-admin/upload.php3.24 ▲0.0137.42 ▼1.51

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Modal Guten Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲11113.45 ▼1.118.94 ▲6.9939.48 ▼6.20
Dashboard /wp-admin2,189 ▲155.50 ▼0.0886.29 ▼20.8342.03 ▼2.20
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0235.70 ▼4.7138.57 ▼0.42
Add New Post /wp-admin/post-new.php6,196 ▲4,67018.84 ▼4.16941.74 ▲286.3354.63 ▼14.78
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.04108.95 ▼1.5545.54 ▲0.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: gutenberg, popup, window, modal, block

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

The main PHP file in "Modal Guten Block" ver. 2.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("modal-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin17,478 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON30015,597
JavaScript43011731,425
Sass3704315
Markdown172095
PHP2125244
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin