83% default-permalink

Code Review | Default Permalink

WordPress plugin Default Permalink scored83%from 54 tests.

About plugin

  • Plugin page: default-permalink
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2014
  • Latest release: Mar 8, 2015
  • Number of updates: 14
  • Update frequency: every 18.3 days
  • Top authors: RedWoodCIty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,434 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
Install script ran successfully

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

This is a short check of server-side resources used by Default Permalink
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.89 ▼3.39
Dashboard /wp-admin3.32 ▲0.0149.85 ▼0.45
Posts /wp-admin/edit.php3.37 ▲0.0154.06 ▲4.90
Add New Post /wp-admin/post-new.php5.90 ▲0.01101.43 ▼12.80
Media Library /wp-admin/upload.php3.24 ▲0.0136.55 ▲2.30
Default Permalink /wp-admin/options-general.php?page=df_menu3.2132.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Default Permalink
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.371.56 ▼0.2942.61 ▼4.29
Dashboard /wp-admin2,199 ▲195.66 ▲0.0386.00 ▼7.1840.97 ▼4.40
Posts /wp-admin/edit.php2,104 ▲71.97 ▼0.0340.30 ▲2.4037.17 ▲2.72
Add New Post /wp-admin/post-new.php1,531 ▲523.02 ▲0.06661.98 ▼56.0554.69 ▼0.50
Media Library /wp-admin/upload.php1,401 ▲14.26 ▲0.02102.88 ▼4.3144.59 ▼3.58
Default Permalink /wp-admin/options-general.php?page=df_menu7982.0023.7425.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/default-permalink/wp-default-permalink.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === default-permalink === )
You can look at the official readme.txt

default-permalink/wp-default-permalink.php 85% from 13 tests

The principal PHP file in "Default Permalink" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 143 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("default-permalink.php" instead of "wp-default-permalink.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1111144
PO File11123

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin