68% ape-auto-popup-expiry

Code Review | Auto Popup Expiry

WordPress plugin Auto Popup Expiry scored 68% from 54 tests.

About plugin

  • Plugin page: ape-auto-popup-ex...
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 26, 2019
  • Latest release: Jul 31, 2019
  • Number of updates: 54
  • Update frequency: every 3.5 days
  • Top authors: edoardorinaldi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 868 total downloads

Benchmarks

Plugin footprint 65% 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.91MB] [CPU: ▼32.70ms] Passed 4 tests

Analyzing server-side resources used by Auto Popup Expiry
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.51 ▼1.67
Dashboard /wp-admin3.04 ▼0.2722.91 ▼25.53
Posts /wp-admin/edit.php3.04 ▼0.3222.71 ▼25.21
Add New Post /wp-admin/post-new.php3.04 ▼2.8522.57 ▼68.13
Media Library /wp-admin/upload.php3.04 ▼0.1924.38 ▼11.94

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 33 new options
New WordPress options
notification_bkg_color
widget_recent-posts
popup_window_color
theysaidso_admin_options
notification_margin
notification_position_top
myselect
popup_window_image
notification_position_bottom
popup_window_radius
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Auto Popup Expiry
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8214.46 ▼0.011.71 ▼0.1639.19 ▼8.82
Dashboard /wp-admin2,220 ▲294.91 ▼0.95104.14 ▼2.2496.78 ▲58.36
Posts /wp-admin/edit.php2,109 ▲201.97 ▼0.0336.65 ▲0.4834.06 ▲1.15
Add New Post /wp-admin/post-new.php1,682 ▲14822.37 ▼1.03673.17 ▲61.3958.40 ▼9.10
Media Library /wp-admin/upload.php1,396 ▲114.25 ▼0.03102.45 ▼2.2784.64 ▲39.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 33 options in the database
    • notification_position_bottom
    • db_upgraded
    • notification_width
    • notification_close_color
    • popup_window_radius
    • popup_window_image
    • myselectout
    • popup_window_date
    • widget_recent-posts
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ape-auto-popup-expiry/autopop.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ape-auto-popup-expiry/ape-auto-popup-expiry.php:49
    • > PHP Notice
      Undefined variable: myoption in wp-content/plugins/ape-auto-popup-expiry/autopop.php on line 209
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/ape-auto-popup-expiry/inc/switch.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ape-auto-popup-expiry/inc/anim-out.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ape-auto-popup-expiry/auto_popup_expiry_admin.php:32
    • > PHP Notice
      Undefined variable: myoption in wp-content/plugins/ape-auto-popup-expiry/autopop.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ape-auto-popup-expiry/inc/anim-in.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: popup wordpress, auto popup expiry, auto expire popup, popup, simple popup...

ape-auto-popup-expiry/ape-auto-popup-expiry.php Passed 13 tests

"Auto Popup Expiry" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
103 characters long description:
APE - Auto Popup Expiry is a simply plugin for wordpress usefull for create automatic deactivate popup.

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
Good job! No executable or dangerous file extensions detected3,933 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS1557133,055
PHP628359877
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ape.png3.11KB2.24KB▼ 27.77%
images/expiry.png1.26KB0.62KB▼ 50.54%