84% remove-old-slug-for-postpages

Code Review | Remove Old Slug For Post/Pages

WordPress plugin Remove Old Slug For Post/Pages scored84%from 54 tests.

About plugin

  • Plugin page: remove-old-slug-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3
  • WordPress version: 6.3.1
  • First release: Jan 17, 2020
  • Latest release: Jan 17, 2020
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: sach3932 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /677 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Remove Old Slug For Post/Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.41 ▼6.93
Dashboard /wp-admin3.31 ▲0.0150.05 ▲2.37
Posts /wp-admin/edit.php3.37 ▲0.0149.35 ▼5.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.86 ▼10.29
Media Library /wp-admin/upload.php3.24 ▲0.0142.16 ▲8.81

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Remove Old Slug For Post/Pages
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.26 ▼0.311.90 ▲0.1944.33 ▼1.48
Dashboard /wp-admin2,207 ▲305.55 ▼0.0285.42 ▼8.7138.80 ▼8.05
Posts /wp-admin/edit.php2,121 ▲211.99 ▼0.0239.41 ▲0.5936.10 ▼0.78
Add New Post /wp-admin/post-new.php1,555 ▲2423.18 ▲0.12659.50 ▼9.3155.50 ▲0.59
Media Library /wp-admin/upload.php1,412 ▲154.20 ▼0.05102.39 ▲0.1844.82 ▼0.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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 everything seems fine, this is not 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/remove-old-slug-for-postpages/remove_old_slug.php on line 54
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/remove-old-slug-for-postpages/remove_old_slug.php on line 54
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/remove-old-slug-for-postpages/remove_old_slug.php on line 54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: old slugs, wp old slugs

remove-old-slug-for-postpages/remove_old_slug.php 92% from 13 tests

The main PHP script in "Remove Old Slug For Post/Pages" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("remove-old-slug-for-postpages.php" instead of "remove_old_slug.php")

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
There were no executable files found in this plugin205 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP193171178
CSS13027

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.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%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.69KB20.45KB▼ 42.71%
images/screenshot-1.png35.69KB20.45KB▼ 42.71%