78% rebuild-permalinks

Code Review | Rebuild Permalinks

WordPress plugin Rebuild Permalinks scored78%from 54 tests.

About plugin

  • Plugin page: rebuild-permalinks
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: Mar 29, 2020
  • Number of updates: 25
  • Update frequency: every 71.5 days
  • Top authors: gerrygooner (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /9,401 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.17ms] Passed 4 tests

This is a short check of server-side resources used by Rebuild Permalinks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.26 ▼2.97
Dashboard /wp-admin3.31 ▲0.0142.55 ▼6.32
Posts /wp-admin/edit.php3.36 ▲0.0144.36 ▼5.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.43 ▼1.51
Media Library /wp-admin/upload.php3.23 ▲0.0032.96 ▲0.25
Rebuild Permalinks /wp-admin/tools.php?page=rebuild-permalinks3.2330.39

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rebuild Permalinks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.41 ▲0.111.66 ▼0.0935.56 ▼4.19
Dashboard /wp-admin2,210 ▲194.86 ▼1.04110.47 ▲6.2243.96 ▲0.44
Posts /wp-admin/edit.php2,096 ▲72.12 ▲0.1238.44 ▼1.2834.58 ▼8.35
Add New Post /wp-admin/post-new.php1,517 ▼1117.57 ▼0.87616.48 ▼24.5253.39 ▲2.26
Media Library /wp-admin/upload.php1,389 ▲74.25 ▼0.0298.38 ▲2.0042.96 ▲1.18
Rebuild Permalinks /wp-admin/tools.php?page=rebuild-permalinks8122.0624.3525.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=rebuild-permalinks
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=rebuild-permalinks
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/rebuild-permalinks/rebuild-permalinks-admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rebuild-permalinks/rebuild-permalinks.php:19

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Rebuild Permalinks settings screen.) image required
You can take inspiration from this readme.txt

rebuild-permalinks/rebuild-permalinks.php Passed 13 tests

The primary PHP file in "Rebuild Permalinks" version 1.6 is used by WordPress to initiate all plugin functionality
18 characters long description:
Rebuild Permalinks

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 plugin127 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2281990
PO File191237

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png4.36KB4.37KB0.00%