90% wp-slug-post-type-custom-language

Code Review | WP Slug Post Type Custom Language (Polylang)

WordPress plugin WP Slug Post Type Custom Language (Polylang) scored90%from 54 tests.

About plugin

  • Plugin page: wp-slug-post-type...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 27, 2016
  • Latest release: Dec 24, 2022
  • Number of updates: 79
  • Update frequency: every 29.3 days
  • Top authors: carlosramosweb (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /5,745 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.07ms] Passed 4 tests

A check of server-side resources used by WP Slug Post Type Custom Language (Polylang)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.74 ▼10.60
Dashboard /wp-admin3.42 ▲0.1245.94 ▼2.38
Posts /wp-admin/edit.php3.53 ▲0.1844.41 ▼2.62
Add New Post /wp-admin/post-new.php6.00 ▲0.1283.10 ▼12.68
Media Library /wp-admin/upload.php3.34 ▲0.1234.67 ▲0.78
Slug Language /wp-admin/admin.php?page=new-custom-slug-language3.3130.10
Slug Language /wp-admin/tools.php?page=custom-slug-language3.3131.60
Slug Language /wp-admin/admin.php?page=edit-custom-slug-language3.3131.75

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
crrq_wp_slug_post_type_custom_language
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Slug Post Type Custom Language (Polylang)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.28 ▼1.091.85 ▲0.0643.02 ▼2.86
Dashboard /wp-admin2,213 ▲224.86 ▼1.07105.61 ▲5.9740.02 ▼1.77
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0335.75 ▲0.7732.71 ▼2.45
Add New Post /wp-admin/post-new.php1,546 ▲2718.21 ▼4.94627.14 ▼61.0354.01 ▼8.33
Media Library /wp-admin/upload.php1,392 ▲74.26 ▲0.0793.75 ▼10.9641.99 ▼4.11
Slug Language /wp-admin/admin.php?page=new-custom-slug-language7472.0523.3920.96
Slug Language /wp-admin/tools.php?page=custom-slug-language9352.0123.3325.95
Slug Language /wp-admin/admin.php?page=edit-custom-slug-language7442.1822.4220.42

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 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
10 plugin tags: manager, post custom, post_type, slug, language...

wp-slug-post-type-custom-language/wp-slug-post-type-custom-language.php 92% from 13 tests

The entry point to "WP Slug Post Type Custom Language (Polylang)" version 1.0.7 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected766 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP64039669
PO File13911597

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues 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.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin