77% page-expiration-robot

Code Review | Page Expiration Robot - Countdown Timer

WordPress plugin Page Expiration Robot - Countdown Timer scored77%from 54 tests.

About plugin

  • Plugin page: page-expiration-r...
  • Plugin version: 3.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2011
  • Latest release: Nov 2, 2016
  • Number of updates: 136
  • Update frequency: every 14.6 days
  • Top authors: socratous139 (100%)

Code review

54 tests

User reviews

100 reviews

Install metrics

200+ active /70,656 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.22ms] Passed 4 tests

An overview of server-side resources used by Page Expiration Robot - Countdown Timer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.12 ▼2.01
Dashboard /wp-admin3.36 ▲0.0651.75 ▲2.92
Posts /wp-admin/edit.php3.47 ▲0.1248.60 ▼0.82
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.85 ▼23.99
Media Library /wp-admin/upload.php3.28 ▲0.0539.02 ▼2.07
Create New Campaign /wp-admin/admin.php?page=page_expiration_robot_saas_add3.2531.80
Timers /wp-admin/admin.php?page=page_expiration_robot_saas3.2531.47
Open PER Everywhere /wp-admin/admin.php?page=page_expiration_robot_saasopenSAAS3.2531.39
Help /wp-admin/admin.php?page=page_expiration_robot_saas_help3.2534.82
Settings /wp-admin/admin.php?page=page_expiration_robot_saas_settings3.2627.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Page Expiration Robot - Countdown Timer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.11 ▼0.091.98 ▼0.1747.30 ▲1.16
Dashboard /wp-admin2,234 ▲575.60 ▲0.0799.40 ▲7.6387.65 ▲41.52
Posts /wp-admin/edit.php2,139 ▲422.13 ▲0.1435.31 ▼2.5433.98 ▼4.99
Add New Post /wp-admin/post-new.php1,563 ▲2623.02 ▲4.77709.27 ▲20.5872.11 ▲2.37
Media Library /wp-admin/upload.php1,442 ▲454.27 ▲0.04101.45 ▼5.3771.33 ▲29.05
Create New Campaign /wp-admin/admin.php?page=page_expiration_robot_saas_add1,6132.3629.9034.31
Timers /wp-admin/admin.php?page=page_expiration_robot_saas1,6132.3528.1540.58
Open PER Everywhere /wp-admin/admin.php?page=page_expiration_robot_saasopenSAAS8752.7332.9649.79
Help /wp-admin/admin.php?page=page_expiration_robot_saas_help7491.606.5330.81
Settings /wp-admin/admin.php?page=page_expiration_robot_saas_settings9262.0123.4325.45

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/page-expiration-robot/campaigns.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/page-expiration-robot/newCampaign.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'PageExpirationRobotSAAS' not found in wp-content/plugins/page-expiration-robot/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/page-expiration-robot/page-expiration-robot-saas.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=page_expiration_robot_saas_settings
    • > Network (severe)
    https://pageexpirationrobot.com/v2/wp-content/uploads/2014/10/New-Logo.png - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=page_expiration_robot_saasopenSAAS
    • > Other (warning) in unknown
    https://www.google.com/adsense/domains/caf.js 218 Unrecognized feature: 'attribution-reporting'.
    • > GET request to /wp-admin/admin.php?page=page_expiration_robot_saas_help
    • > Network (severe)
    https://pageexpirationrobot.helpscoutdocs.com/collection/120-web-app-faq - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 40 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Page Expiration Robot options overview.), #2 (Evergreen scarcity options)
The official readme.txt might help

page-expiration-robot/page-expiration-robot-saas.php 85% from 13 tests

"Page Expiration Robot - Countdown Timer" version 3.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("page-expiration-robot.php" instead of "page-expiration-robot-saas.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected385 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP417411281
JavaScript250293
CSS14011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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/hourglass_plus.png0.60KB0.48KB▼ 19.61%
images/per_icon.png0.60KB0.48KB▼ 19.61%