79% simple-popup-block

Code Review | Simple Popup Block

WordPress plugin Simple Popup Block scored79%from 54 tests.

About plugin

  • Plugin page: simple-popup-block
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 20, 2023
  • Latest release: Nov 20, 2023
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: codemanas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /15 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼7.98ms] Passed 4 tests

Analyzing server-side resources used by Simple Popup Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1838.33 ▼6.08
Dashboard /wp-admin3.47 ▲0.1246.44 ▼16.00
Posts /wp-admin/edit.php3.58 ▲0.2346.41 ▼0.88
Add New Post /wp-admin/post-new.php6.06 ▲0.1781.38 ▼8.94
Media Library /wp-admin/upload.php3.39 ▲0.1636.11 ▲1.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Popup Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲5714.34 ▼0.061.87 ▲0.1247.37 ▲1.32
Dashboard /wp-admin2,198 ▲215.62 ▲0.0993.68 ▼9.1140.19 ▼3.05
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0139.66 ▲2.7234.19 ▼4.17
Add New Post /wp-admin/post-new.php1,697 ▲16222.29 ▼2.77623.39 ▼31.6130.32 ▼39.60
Media Library /wp-admin/upload.php1,400 ▲94.17 ▲0.0199.74 ▼1.7640.71 ▲0.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-popup-block/patterns/blank.php
    • > /wp-content/plugins/simple-popup-block/patterns/cyber-monday.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-popup-block/patterns/cookie.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-popup-block/patterns/newsletter.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-popup-block/patterns/notice.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-popup-block/patterns/christmas.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-popup-block/patterns/illustration.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-popup-block/patterns/vacation.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Codemanas\\SimplePopupBlock\\get_bloginfo() in wp-content/plugins/simple-popup-block/includes/Bootstrap.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-popup-block/patterns/new-year.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: simple-popup, block, modal, popup

simple-popup-block/simple-popup-block.php Passed 13 tests

This is the main PHP file of "Simple Popup Block" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
A simple and easy to use popup block plugin for block editor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,041 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP24232472927
JSON200111
CSS2002
JavaScript2011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity16.71
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods57
▷ Static methods2238.60%
▷ Public methods5189.47%
▷ Protected methods35.26%
▷ Private methods35.26%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.43MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
patterns/assets/warning.png5.31KB3.15KB▼ 40.78%
build/images/blank.839b3799.png4.13KB2.03KB▼ 50.70%
patterns/assets/cookies.png17.79KB8.00KB▼ 55.01%
patterns/assets/emailLogo.png4.37KB1.93KB▼ 55.73%
patterns/assets/boyBusiness.png408.88KB141.36KB▼ 65.43%