83% simple-post-expiration

Code Review | Simple Post Expiration

WordPress plugin Simple Post Expiration scored83%from 54 tests.

About plugin

  • Plugin page: simple-post-expir...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 6.3.1
  • First release: Aug 19, 2014
  • Latest release: Oct 10, 2016
  • Number of updates: 11
  • Update frequency: every 71.1 days
  • Top authors: mordauk (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

900+ active /14,378 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.65ms] Passed 4 tests

A check of server-side resources used by Simple Post Expiration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.03 ▼4.56
Dashboard /wp-admin3.33 ▼0.0249.13 ▼22.03
Posts /wp-admin/edit.php3.38 ▲0.0249.01 ▲3.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.77 ▼14.87
Media Library /wp-admin/upload.php3.25 ▲0.0239.62 ▲2.86

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Post Expiration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.341.70 ▲0.0339.90 ▲2.50
Dashboard /wp-admin2,195 ▲155.57 ▼0.1085.91 ▼7.3344.95 ▼1.02
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0140.17 ▲6.0738.33 ▲0.95
Add New Post /wp-admin/post-new.php1,548 ▲2018.45 ▼4.67698.74 ▲18.8060.48 ▲3.24
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.00101.07 ▼6.9046.79 ▼0.21

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_pw_spe_widget
    • theysaidso_admin_options

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-post-expiration/simple-post-expiration.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 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
3 plugin tags: posts, expiration, expire

simple-post-expiration/simple-post-expiration.php 77% from 13 tests

The main PHP file in "Simple Post Expiration" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • 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
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

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
Good job! No executable or dangerous file extensions detected371 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP693149210
PO File34545144
JavaScript112016
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_cc0000_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_999999_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_21759b_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_333333_256x240.png3.62KB4.11KB0.00%