84% acf-permalinks

Code Review | ACF Permalinks

WordPress plugin ACF Permalinks scored 84% from 54 tests.

About plugin

  • Plugin page: acf-permalinks
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.0
  • WordPress version: 5.9.2
  • First release: Aug 25, 2018
  • Latest release: Oct 24, 2018
  • Number of updates: 10
  • Update frequency: every 10.0 days
  • Top authors: athlan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 2,387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼2.43MB] [CPU: ▼353.58ms] Passed 4 tests

This is a short check of server-side resources used by ACF Permalinks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.94 ▼1.584.41 ▼48.89
Dashboard /wp-admin1.96 ▼1.454.13 ▼28.87
Posts /wp-admin/edit.php1.96 ▼1.684.08 ▼35.06
Add New Post /wp-admin/post-new.php1.96 ▼5.013.96 ▼1,301.51
Media Library /wp-admin/upload.php1.96 ▼1.344.15 ▼24.45

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ACF Permalinks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,824 ▲7015.66 ▼0.355.95 ▲0.042.43 ▼0.17
Dashboard /wp-admin2,927 ▲666.15 ▼0.07119.58 ▼18.85159.09 ▼0.05
Posts /wp-admin/edit.php2,728 ▲713.24 ▲0.0064.85 ▲3.13142.45 ▲2.12
Add New Post /wp-admin/post-new.php1,736 ▲4620.71 ▲2.49445.19 ▲31.95158.67 ▼4.48
Media Library /wp-admin/upload.php1,737 ▲425.55 ▲0.01146.91 ▲7.05196.37 ▲7.21

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
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/acf-permalinks/includes/preconditions/class-cfp-preconditions.php+33
    constant(): Couldn't find constant WORDPRESS_CUSTOM_FIELDS_PERMALINK_PLUGIN_VERSION

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfPermalinks\\Field_Permalink_Formatter' not found in wp-content/plugins/acf-permalinks/includes/formatter/class-checkbox-formatter.php:16
    • > PHP Notice
      Undefined variable: precondition_result in wp-content/plugins/acf-permalinks/includes/admin/plugin-dependency-notice.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-permalinks/includes/main.php:49
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfPermalinks\\Field_Permalink_Formatter' not found in wp-content/plugins/acf-permalinks/includes/formatter/class-datepicker-formatter.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AcfPermalinks\\add_action() in wp-content/plugins/acf-permalinks/includes/admin/plugin-dependency-notice.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfPermalinks\\Field_Permalink_Formatter' not found in wp-content/plugins/acf-permalinks/includes/formatter/class-radio-formatter.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfPermalinks\\Field_Permalink_Formatter' not found in wp-content/plugins/acf-permalinks/includes/formatter/class-user-formatter.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfPermalinks\\Field_Permalink_Formatter' not found in wp-content/plugins/acf-permalinks/includes/formatter/class-post-formatter.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'AcfPermalinks\\Field_Permalink_Formatter' not found in wp-content/plugins/acf-permalinks/includes/formatter/class-default-formatter.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-permalinks/includes/main.php:49

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

acf-permalinks/acf-permalinks.php 92% from 13 tests

The principal PHP file in "ACF Permalinks" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 260 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin480 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP16158475428
Markdown225052

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.23
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods42
▷ Static methods511.90%
▷ Public methods3685.71%
▷ Protected methods00.00%
▷ Private methods614.29%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
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
assets/screenshot-2.png39.41KB23.58KB▼ 40.18%
assets/screenshot-1.png30.68KB19.76KB▼ 35.58%