83% xo-for-angular

Code Review | Xo for Angular

WordPress plugin Xo for Angular scored83%from 54 tests.

About plugin

  • Plugin page: xo-for-angular
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2019
  • Latest release: Mar 26, 2019
  • Number of updates: 37
  • Update frequency: every 0.9 days
  • Top authors: warriorrocker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,004 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▲2.69ms] Passed 4 tests

Server-side resources used by Xo for Angular
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1839.14 ▼3.21
Dashboard /wp-admin3.54 ▲0.2347.78 ▲0.05
Posts /wp-admin/edit.php3.59 ▲0.2355.26 ▲10.75
Add New Post /wp-admin/post-new.php6.12 ▲0.23113.04 ▲22.67
Media Library /wp-admin/upload.php3.46 ▲0.2338.18 ▲3.16
General Options /wp-admin/admin.php?page=angular-xo3.3635.81
Tools /wp-admin/admin.php?page=angular-xo-tools3.3634.41

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 73 new files
Database: no new tables, 22 new options
New WordPress options
theysaidso_admin_options
xo_index_src
xo_index_live_footer
xo_templates_cache_enabled
xo_acf_allowed_groups
xo_access_control_allowed_hosts
xo_templates_cache
xo_index_redirect_mode
xo_templates_reader_enabled
xo_index_live_config
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Xo for Angular
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲14113.29 ▼1.114.68 ▲2.9241.23 ▼3.17
Dashboard /wp-admin2,266 ▲785.91 ▲0.01111.84 ▲6.2342.38 ▼2.76
Posts /wp-admin/edit.php2,149 ▲602.02 ▼0.0141.63 ▲6.2136.87 ▲0.21
Add New Post /wp-admin/post-new.php1,544 ▲1118.43 ▼4.83612.21 ▼73.6659.86 ▼9.01
Media Library /wp-admin/upload.php1,451 ▲634.28 ▲0.0999.76 ▼8.3842.92 ▼2.57
General Options /wp-admin/admin.php?page=angular-xo9812.1923.9631.31
Tools /wp-admin/admin.php?page=angular-xo-tools8532.1929.1731.48

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 22 options
    • widget_recent-comments
    • db_upgraded
    • xo_routing_previews_enabled
    • xo_api_endpoint
    • xo_api_access_control_mode
    • theysaidso_admin_options
    • xo_acf_allowed_groups
    • xo_api_enabled
    • widget_theysaidso_widget
    • xo_templates_reader_enabled
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 40× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'XoApiAbstractIndexController' not found in wp-content/plugins/xo-for-angular/Includes/Api/Controllers/OptionsController.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoOptionsAbstractSettingsTab' not found in wp-content/plugins/xo-for-angular/Includes/Options/Tabs/General/IndexTab.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoApiAbstractResponse' not found in wp-content/plugins/xo-for-angular/Includes/Api/Abstract/Responses/RoutesBreadcrumbsResponse.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoApiAbstractResponse' not found in wp-content/plugins/xo-for-angular/Includes/Api/Abstract/Responses/PostsGetResponse.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoApiAbstractResponse' not found in wp-content/plugins/xo-for-angular/Includes/Api/Abstract/Responses/TermsGetResponse.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoOptionsAbstractSettingsTab' not found in wp-content/plugins/xo-for-angular/Includes/Options/Tabs/General/AcfTab.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoApiAbstractResponse' not found in wp-content/plugins/xo-for-angular/Includes/Api/Abstract/Responses/PostsConfigResponse.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoOptionsAbstractFieldsTab' not found in wp-content/plugins/xo-for-angular/Includes/Options/Tabs/Tools/ExportTab.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoApiAbstractResponse' not found in wp-content/plugins/xo-for-angular/Includes/Api/Abstract/Responses/RoutesSitemapResponse.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'XoApiAbstractIndexController' not found in wp-content/plugins/xo-for-angular/Includes/Api/Controllers/TermsController.class.php:8

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: routes, angular cms, dynamic routing, controllers, annotations...

xo-for-angular/xo-angular.php 77% from 13 tests

The primary PHP file in "Xo for Angular" version 1.1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xo-for-angular.php" instead of "xo-angular.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/Languages")

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
Success! There were no dangerous files found in this plugin3,258 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP669232,4293,127
CSS117070
SVG20237
Markdown110024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.34
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes65
▷ Abstract classes00.00%
▷ Concrete classes65100.00%
▷ Final classes00.00%
Methods245
▷ Static methods00.00%
▷ Public methods17571.43%
▷ Protected methods3715.10%
▷ Private methods3313.47%
Functions45
▷ Named functions00.00%
▷ Anonymous functions45100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected