83% page-popup

Code Review | Page Popup

WordPress plugin Page Popup scored83%from 54 tests.

About plugin

  • Plugin page: page-popup
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Feb 6, 2020
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: creativeencode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /505 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.06MB] [CPU: ▼5.58ms] Passed 4 tests

This is a short check of server-side resources used by Page Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.90 ▼0.40
Dashboard /wp-admin3.37 ▲0.0744.60 ▼4.70
Posts /wp-admin/edit.php3.42 ▲0.0648.25 ▼13.18
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.18 ▼4.05
Media Library /wp-admin/upload.php3.29 ▲0.0637.10 ▲4.04
Popup Plugin Settings /wp-admin/options-general.php?page=wordpress_popup_plugin_settings3.3038.06

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
wordpress_popup_plugin_version
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Page Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲24013.58 ▼0.7010.52 ▲8.8343.70 ▼4.05
Dashboard /wp-admin2,217 ▲324.83 ▼1.0697.91 ▼18.3740.39 ▼2.89
Posts /wp-admin/edit.php2,100 ▲112.07 ▲0.0540.88 ▲4.6734.62 ▲0.60
Add New Post /wp-admin/post-new.php1,521 ▼1223.10 ▼0.04660.12 ▲21.9651.66 ▲1.87
Media Library /wp-admin/upload.php1,396 ▲84.28 ▲0.1098.80 ▲0.4041.87 ▼1.81
Popup Plugin Settings /wp-admin/options-general.php?page=wordpress_popup_plugin_settings1,4503.4055.7127.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • wordpress_popup_plugin_version
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× 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/page-popup/includes/wordpress-popup-plugin-metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-popup/template/popup_temp.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please a description for screenshot #3 in page-popup/assets to your readme.txt
The official readme.txt is a good inspiration

page-popup/popup.php 85% from 13 tests

"Page Popup" version 1.0.0'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: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("page-popup.php" instead of "popup.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
Good job! No executable or dangerous file extensions detected1,780 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP9222562902
CSS38526646
JavaScript74123228
Markdown1204

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.40
▷ Minimum class complexity5.00
▷ Maximum class complexity62.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3892.68%
▷ Protected methods00.00%
▷ Private methods37.32%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.33MB with 0.24MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png182.04KB49.02KB▼ 73.07%
screenshot-2.png153.36KB44.51KB▼ 70.98%