84% media-post-permalink

Code Review | Media Post Permalink

WordPress plugin Media Post Permalink scored 84% from 54 tests.

About plugin

  • Plugin page: media-post-permalink
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jun 4, 2017
  • Latest release: Nov 16, 2017
  • Number of updates: 7
  • Update frequency: every 30.6 days
  • Top authors: sasiddiqui (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Media Post Permalink
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.67 ▼6.68
Dashboard /wp-admin3.31 ▲0.0145.63 ▼3.67
Posts /wp-admin/edit.php3.36 ▲0.0146.75 ▼0.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0199.36 ▲2.42
Media Library /wp-admin/upload.php3.23 ▲0.0132.29 ▼0.17

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Media Post Permalink: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8114.77 ▲0.461.51 ▼0.2142.04 ▼3.25
Dashboard /wp-admin2,222 ▲344.88 ▼0.01108.40 ▼10.8442.89 ▼3.37
Posts /wp-admin/edit.php2,105 ▲191.98 ▼0.0439.97 ▲4.3635.61 ▼0.89
Add New Post /wp-admin/post-new.php1,547 ▲1223.31 ▲0.31569.51 ▼77.1452.57 ▲1.55
Media Library /wp-admin/upload.php1,407 ▲194.22 ▲0.0698.07 ▲1.2042.92 ▲0.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/media-post-permalink/media-post-permalink.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: remove parent post, media, attachment, permalink, user-friendly...

media-post-permalink/media-post-permalink.php Passed 13 tests

The entry point to "Media Post Permalink" version 0.1 is a PHP file that has certain tags in its header comment area
123 characters long description:
Media Post Permalink is simply the easiest solution to separate your media/attachment Permalinks and make it User Friendly.

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 plugin211 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33146176
CSS20135

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin