10% remove-all-post-slug

Code Review | Remove All Post Slug

WordPress plugin Remove All Post Slug scored10%from 54 tests.

About plugin

  • Plugin page: remove-all-post-slug
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.8
  • WordPress version: 6.3.1
  • First release: Sep 11, 2017
  • Latest release: Sep 11, 2017
  • Number of updates: 4
  • Update frequency: every 6.0 days
  • Top authors: saad3074 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /719 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/remove-all-post-slug/remove-post-slug.php+135
    Invalid argument supplied for foreach()

Server metrics [RAM: ▼1.19MB] [CPU: ▼45.23ms] Passed 4 tests

An overview of server-side resources used by Remove All Post Slug
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6717.20 ▼25.78
Dashboard /wp-admin2.83 ▼0.5123.40 ▼44.90
Posts /wp-admin/edit.php2.83 ▼0.5219.53 ▼30.14
Add New Post /wp-admin/post-new.php2.83 ▼3.0519.54 ▼80.09
Media Library /wp-admin/upload.php2.83 ▼0.3921.39 ▼17.68
Custom post type /wp-admin/options-general.php?page=remove-all-post-slug/remove-post-slug.php2.8320.32

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/remove-all-post-slug/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Remove All Post Slug
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.22 ▼1.082.07 ▲0.2444.39 ▼2.70
Dashboard /wp-admin2,225 ▲194.84 ▼0.05102.80 ▼8.6440.73 ▼0.57
Posts /wp-admin/edit.php2,104 ▲42.05 ▼0.0935.97 ▼1.7034.61 ▲0.88
Add New Post /wp-admin/post-new.php1,552 ▼223.30 ▲5.00666.56 ▲24.2349.49 ▼10.65
Media Library /wp-admin/upload.php1,404 ▲44.23 ▼0.02106.10 ▲1.4944.72 ▼2.40
Custom post type /wp-admin/options-general.php?page=remove-all-post-slug/remove-post-slug.php8082.0227.3227.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/remove-all-post-slug/remove-post-slug.php+135
    Invalid argument supplied for foreach()
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=remove-all-post-slug/remove-post-slug.php
    • > Warning in wp-content/plugins/remove-all-post-slug/remove-post-slug.php+135
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/options-general.php?page=remove-all-post-slug/remove-post-slug.php
    • > Notice in wp-content/plugins/remove-all-post-slug/remove-post-slug.php+140
    Undefined variable: arr
    • > GET request to /wp-admin/options-general.php?page=remove-all-post-slug/remove-post-slug.php
    • > Warning in wp-content/plugins/remove-all-post-slug/remove-post-slug.php+140
    count(): Parameter must be an array or an object that implements Countable

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/remove-all-post-slug/index.php:229
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/remove-all-post-slug/remove-post-slug.php:244

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === remove-all-post-slug === )
Please take inspiration from this readme.txt

remove-all-post-slug/remove-post-slug.php 92% from 13 tests

Analyzing the main PHP file in "Remove All Post Slug" version 1.0.0
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("remove-all-post-slug.php" instead of "remove-post-slug.php")

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 plugin478 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25914478

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity40.50
▷ Minimum class complexity40.00
▷ Maximum class complexity41.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods416.67%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
PNG images were not found in this plugin