10% custom-post-type-multiroutes

Code Review | Custom Post Type Multiroutes

WordPress plugin Custom Post Type Multiroutes scored10%from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 0.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2020
  • Latest release: Jan 7, 2020
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: arg82 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /498 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Parse error in wp-content/plugins/custom-post-type-multiroutes/custom-post-type-multiroutes.php+658
    syntax error, unexpected end of file

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

Server-side resources used by Custom Post Type Multiroutes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.63 ▼3.47
Dashboard /wp-admin3.31 ▼0.0444.82 ▼16.85
Posts /wp-admin/edit.php3.36 ▲0.0056.41 ▲9.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.30 ▼4.01
Media Library /wp-admin/upload.php3.23 ▲0.0037.51 ▲2.00

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom Post Type Multiroutes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼1.061.71 ▼1.5544.35 ▲1.63
Dashboard /wp-admin2,197 ▲94.84 ▼1.04163.12 ▲38.7967.17 ▲22.91
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0254.24 ▲15.2945.53 ▲11.93
Add New Post /wp-admin/post-new.php1,373 ▼15616.23 ▼2.02726.76 ▲112.8665.86 ▲5.42
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.02110.60 ▲10.6147.82 ▲3.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/custom-post-type-multiroutes/custom-post-type-multiroutes.php on line 658

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
6 plugin tags: slugs, routes, multiroutes, translate slugs, custom post types...

custom-post-type-multiroutes/custom-post-type-multiroutes.php 92% from 13 tests

The main PHP file in "Custom Post Type Multiroutes" ver. 0.1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected686 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP292129607
PO File1232679

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin