84% media-expirator

Code Review | Media Expirator

WordPress plugin Media Expirator scored84%from 54 tests.

About plugin

  • Plugin page: media-expirator
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Oct 19, 2015
  • Number of updates: 41
  • Update frequency: every 0.2 days
  • Top authors: peakweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,388 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.60ms] Passed 4 tests

A check of server-side resources used by Media Expirator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.74 ▼1.35
Dashboard /wp-admin3.33 ▲0.0344.88 ▼0.06
Posts /wp-admin/edit.php3.38 ▲0.0344.43 ▼1.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.58 ▼1.06
Media Library /wp-admin/upload.php3.25 ▲0.0333.86 ▼2.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Media Expirator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.191.63 ▼0.4041.05 ▼2.86
Dashboard /wp-admin2,206 ▲154.86 ▼0.99107.67 ▲5.8142.88 ▼1.85
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0739.35 ▼2.0336.34 ▲1.61
Add New Post /wp-admin/post-new.php1,542 ▲2018.44 ▼4.93586.83 ▼116.1961.41 ▲5.46
Media Library /wp-admin/upload.php1,382 ▼64.20 ▲0.0296.97 ▼5.8344.21 ▲0.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-expirator/peakweb-media-expirator.php:17

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 96% from 29 tests

readme.txt Passed 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
10 plugin tags: expire, photo, pictures, picture, plugin...

media-expirator/peakweb-media-expirator.php 92% from 13 tests

The main PHP file in "Media Expirator" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("media-expirator.php" instead of "peakweb-media-expirator.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
Everything looks great! No dangerous files found in this plugin157 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File2161686
PHP1273271

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin