83% stylistic-modals

Code Review | Stylistic Modals - Create Beautiful Popups with the Gutenberg Editor

WordPress plugin Stylistic Modals - Create Beautiful Popups with the Gutenberg Editor scored 83% from 54 tests.

About plugin

  • Plugin page: stylistic-modals
  • Plugin version: 1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 5.8.1
  • First release: Jan 15, 2020
  • Latest release: Nov 25, 2020
  • Number of updates: 11
  • Update frequency: every 28.6 days
  • Top authors: Bloodspencer (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 971 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼139.56ms] Passed 4 tests

An overview of server-side resources used by Stylistic Modals - Create Beautiful Popups with the Gutenberg Editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2350.05 ▲24.61
Dashboard /wp-admin3.17 ▲0.1154.06 ▼1.75
Posts /wp-admin/edit.php3.26 ▲0.1545.41 ▼0.36
Add New Post /wp-admin/post-new.php5.61 ▲0.18104.84 ▼554.99
Media Library /wp-admin/upload.php3.11 ▲0.1140.11 ▼1.12
Add New /wp-admin/post-new.php?post_type=stylisticmodal5.6096.69
All Stylistic Modals /wp-admin/edit.php?post_type=stylisticmodal3.1640.78

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stylistic Modals - Create Beautiful Popups with the Gutenberg Editor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,883 ▲31116.36 ▲0.6818.47 ▲7.1651.89 ▼3.99
Dashboard /wp-admin3,029 ▲986.01 ▲0.03160.25 ▼1.22121.48 ▼4.14
Posts /wp-admin/edit.php2,801 ▲622.76 ▲0.0577.66 ▼12.5798.48 ▼1.74
Add New Post /wp-admin/post-new.php1,661 ▲8013.77 ▼2.61329.19 ▼137.97113.18 ▼7.19
Media Library /wp-admin/upload.php1,869 ▲625.10 ▲0.06162.40 ▼24.96135.34 ▲8.39
Add New /wp-admin/post-new.php?post_type=stylisticmodal6,25719.86580.61150.96
All Stylistic Modals /wp-admin/edit.php?post_type=stylisticmodal1,4682.6778.1781.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/stylistic-modals/stylistic-modals.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylistic-modals/inc/files.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylistic-modals/admin/metaboxes.php:106
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylistic-modals/admin/post-type.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylistic-modals/admin/customizations.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylistic-modals/inc/output.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylistic-modals/admin/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylistic-modals/admin/post-type.php:59

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=stylisticmodal
    • > Intervention (severe) in unknown
    /wp-admin/post-new.php?post_type=stylisticmodal - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

stylistic-modals/stylistic-modals.php Passed 13 tests

"Stylistic Modals - Create Beautiful Popups with the Gutenberg Editor" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
106 characters long description:
Create easily beautiful popups in your individual design and write your content with the Gutenberg Editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin898 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP84718687
Sass2280100
CSS331686
JavaScript33625

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.50
▷ Minimum class complexity5.00
▷ Maximum class complexity22.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin