78% dx-remove-oldies

Code Review | DX Remove Oldies

WordPress plugin DX Remove Oldies scored78%from 54 tests.

About plugin

  • Plugin page: dx-remove-oldies
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Mar 24, 2013
  • Latest release: Sep 8, 2014
  • Number of updates: 4
  • Update frequency: every 133.2 days
  • Top authors: nofearinc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,065 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by DX Remove Oldies
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.37 ▼4.63
Dashboard /wp-admin3.32 ▲0.0245.13 ▼4.07
Posts /wp-admin/edit.php3.37 ▲0.0148.10 ▲4.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.94 ▼4.22
Media Library /wp-admin/upload.php3.24 ▲0.0136.46 ▼1.27
Remove Oldies /wp-admin/options-general.php?page=remove_oldies3.2130.42

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for DX Remove Oldies
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.29 ▼1.091.53 ▼0.4141.72 ▼2.17
Dashboard /wp-admin2,213 ▲255.80 ▲0.9594.67 ▼22.3638.63 ▼5.62
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0340.61 ▲4.5934.88 ▼0.18
Add New Post /wp-admin/post-new.php1,540 ▲2623.57 ▲6.02600.17 ▼99.5250.55 ▼0.24
Media Library /wp-admin/upload.php1,389 ▲14.33 ▲0.1298.97 ▼7.1642.24 ▼2.38
Remove Oldies /wp-admin/options-general.php?page=remove_oldies7572.0522.9624.73

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

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 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dx-remove-oldies/oldies-admin-view.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dx-remove-oldies/dx-remove-oldies.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Sample plugin view)
You can look at the official readme.txt

dx-remove-oldies/dx-remove-oldies.php Passed 13 tests

This is the main PHP file of "DX Remove Oldies" version 0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
65 characters long description:
Remove posts from DB for post types that are no longer registered

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected69 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2214359
CSS10010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.74KB6.48KB▼ 67.18%