84% post-expiring

Code Review | Post Expiring

WordPress plugin Post Expiring scored 84% from 54 tests.

About plugin

  • Plugin page: post-expiring
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2014
  • Latest release: Apr 19, 2015
  • Number of updates: 16
  • Update frequency: every 18.0 days
  • Top authors: potreb (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active / 4,797 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Post Expiring
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.13 ▼0.20
Dashboard /wp-admin3.33 ▲0.0243.28 ▼6.38
Posts /wp-admin/edit.php3.38 ▲0.0248.01 ▲4.93
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.15 ▲3.46
Media Library /wp-admin/upload.php3.25 ▲0.0235.01 ▲3.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Post Expiring
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.25 ▼1.121.97 ▲0.1737.13 ▼3.90
Dashboard /wp-admin2,206 ▲184.85 ▼1.0794.08 ▼6.9238.79 ▼4.90
Posts /wp-admin/edit.php2,102 ▲131.98 ▼0.0840.31 ▲4.0836.89 ▲3.13
Add New Post /wp-admin/post-new.php1,527 ▼923.35 ▲0.23579.60 ▼70.7052.92 ▼6.29
Media Library /wp-admin/upload.php1,388 ▼04.29 ▲0.1093.10 ▼1.1341.16 ▼3.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/post-expiring/post-expiring.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: expiring, expired post, expired, date of expiring, date of deactivation...

post-expiring/post-expiring.php Passed 13 tests

This is the main PHP file of "Post Expiring" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Allows you to add an expiration date to posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,499 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2185351,737
CSS16615442
HTML1111178
PHP1168102
PO File1111140

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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
No PNG files were detected