84% popup-block

Code Review | Popup Block

WordPress plugin Popup Block scored84%from 54 tests.

About plugin

  • Plugin page: popup-block
  • Plugin version: 0.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 31, 2020
  • Latest release: Nov 10, 2021
  • Number of updates: 7
  • Update frequency: every 62.6 days
  • Top authors: baicusandrei (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active /5,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.52ms] Passed 4 tests

A check of server-side resources used by Popup Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.74 ▲6.05
Dashboard /wp-admin3.33 ▲0.0247.23 ▼3.26
Posts /wp-admin/edit.php3.38 ▲0.0248.41 ▲5.72
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.04 ▼3.73
Media Library /wp-admin/upload.php3.25 ▲0.0236.17 ▲3.34

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Popup Block: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▲0.051.78 ▼0.0145.73 ▼0.22
Dashboard /wp-admin2,198 ▲215.62 ▼0.0595.53 ▲7.4342.97 ▲3.98
Posts /wp-admin/edit.php2,097 ▼62.02 ▲0.0034.68 ▼2.2033.78 ▼6.24
Add New Post /wp-admin/post-new.php6,366 ▲4,84027.89 ▲4.88905.03 ▲225.1152.74 ▼1.25
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.0096.07 ▲1.0241.03 ▼1.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ABS\\Popup_Block\\plugin_dir_url() in wp-content/plugins/popup-block/popup-block.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ABS\\Popup_Block\\add_action() in wp-content/plugins/popup-block/includes/assets.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
3 plugin tags: popup, modal, block

popup-block/popup-block.php 92% from 13 tests

"Popup Block" version 0.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin750 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
Markdown21310569
JSON10094
PHP4193583
CSS2002
JavaScript2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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
Namespaces1
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.72MB with 0.52MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-2.png51.86KB15.17KB▼ 70.75%
.wordpress-org/screenshot-3.png40.58KB13.25KB▼ 67.34%
.wordpress-org/screenshot-1.png646.11KB131.23KB▼ 79.69%