84% jetrouter

Code Review | JetRouter

WordPress plugin JetRouter scored 84% from 54 tests.

About plugin

  • Plugin page: jetrouter
  • Plugin version: 0.1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-4.7.5
  • WordPress version: 6.3.1
  • First release: May 17, 2017
  • Latest release: May 17, 2017
  • Number of updates: 7
  • Update frequency: every 6.3 days
  • Top authors: salvatore.formisano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 4,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by JetRouter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.25 ▲0.64
Dashboard /wp-admin3.31 ▲0.0045.72 ▼9.39
Posts /wp-admin/edit.php3.36 ▲0.0043.61 ▼3.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.91 ▼12.47
Media Library /wp-admin/upload.php3.23 ▲0.0039.59 ▲4.60

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

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

Browser metrics Passed 4 tests

Checking browser requirements for JetRouter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.29 ▼1.114.43 ▲2.6042.91 ▲0.22
Dashboard /wp-admin2,209 ▲214.85 ▼0.04112.00 ▲6.6041.52 ▲2.02
Posts /wp-admin/edit.php2,086 ▼01.99 ▲0.0136.51 ▼0.2831.98 ▼0.65
Add New Post /wp-admin/post-new.php1,547 ▲1423.43 ▲0.23652.66 ▼23.9956.95 ▲3.03
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.0291.99 ▼6.0141.49 ▼2.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'JetRouter\\RouteParser' not found in wp-content/plugins/jetrouter/src/StaticRouteParser.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Actor' not found in wp-content/plugins/jetrouter/tests/_support/FunctionalTester.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'JetRouter\\RouteParser' not found in wp-content/plugins/jetrouter/src/DynamicRouteParser.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Module' not found in wp-content/plugins/jetrouter/tests/_support/Helper/Acceptance.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Actor' not found in wp-content/plugins/jetrouter/tests/_support/AcceptanceTester.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Actor' not found in wp-content/plugins/jetrouter/tests/_support/UnitTester.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Test\\Unit' not found in wp-content/plugins/jetrouter/tests/unit/RouterTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Module' not found in wp-content/plugins/jetrouter/tests/_support/Helper/Unit.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Codeception\\Module' not found in wp-content/plugins/jetrouter/tests/_support/Helper/Functional.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: http, api, rest, router, routing

jetrouter/jetrouter.php Passed 13 tests

The entry point to "JetRouter" version 0.1.2.1 is a PHP file that has certain tags in its header comment area
50 characters long description:
A lightning fast, easy to use router for WordPress

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
Good job! No executable or dangerous file extensions detected3,059 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP347343,2992,707
Markdown11030237
YAML6616102
JSON20013
SQL1010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.31
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits3
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods276
▷ Static methods155.43%
▷ Public methods23585.14%
▷ Protected methods124.35%
▷ Private methods2910.51%
Functions53
▷ Named functions11.89%
▷ Anonymous functions5298.11%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin