10% wp-experience-api

Code Review | WP Experience API

WordPress plugin WP Experience API scored 10% from 54 tests.

About plugin

  • Plugin page: wp-experience-api
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 11, 2015
  • Latest release: Aug 12, 2015
  • Number of updates: 24
  • Update frequency: every 4.0 days
  • Top authors: loongchan (95.83%)ctlt-dev (8.33%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 1,943 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-experience-api/wp-experience-api.php+122
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.32MB] [CPU: ▲1.56ms] Passed 4 tests

An overview of server-side resources used by WP Experience API
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2242.12 ▼6.11
Dashboard /wp-admin3.70 ▲0.4047.06 ▲0.63
Posts /wp-admin/edit.php3.76 ▲0.4053.89 ▲6.07
Add New Post /wp-admin/post-new.php6.22 ▲0.34103.78 ▲8.86
Media Library /wp-admin/upload.php3.56 ▲0.3437.44 ▲5.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 80 new files
Database: 1 new table, 7 new options
New tables
wp_wpxapi_queue
New WordPress options
widget_recent-posts
theysaidso_admin_options
wpxapi_settings
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Experience API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.80 ▲0.451.95 ▼0.1338.38 ▼4.74
Dashboard /wp-admin2,231 ▲404.89 ▲0.01107.09 ▲8.9841.10 ▼3.40
Posts /wp-admin/edit.php2,117 ▲282.05 ▲0.0639.67 ▼0.7536.10 ▼3.59
Add New Post /wp-admin/post-new.php1,564 ▲2218.61 ▲0.07599.17 ▼1.6250.75 ▼21.29
Media Library /wp-admin/upload.php1,407 ▲194.26 ▲0.0196.56 ▼4.4440.97 ▼0.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_wpxapi_queue
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • wpxapi_settings
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-experience-api/wp-experience-api.php
  • 55× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'TinCan\\VersionableInterface' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/src/StatementBase.php:20
    • > PHP Fatal error
      Trait 'TinCan\\ArraySetterTrait' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/src/Document.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'TinCan\\Map' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/src/Extensions.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/tests/AgentTest.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'TinCan\\VersionableInterface' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/src/Attachment.php:20
    • > PHP Warning
      require_once(tests/Config.php): failed to open stream: No such file or directory in wp-content/plugins/wp-experience-api/includes/TinCanPHP/phpunit.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'TinCan\\Map' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/src/LanguageMap.php:20
    • > PHP Fatal error
      require_once(): Failed opening required 'tests/Config.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-experience-api/includes/TinCanPHP/phpunit.php on line 6
    • > PHP Fatal error
      Uncaught Error: Interface 'TinCan\\VersionableInterface' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/src/ActivityDefinition.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-experience-api/includes/TinCanPHP/tests/AsVersionTraitTest.php:18

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

wp-experience-api/wp-experience-api.php Passed 13 tests

"WP Experience API" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
76 characters long description:
This plugin generates and sends various xAPI statements to the specified LRS

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected5,015 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP661,1171,6334,888
JSON20043
Markdown224039
XML21037
YAML1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.34
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces3
Traits3
Classes52
▷ Abstract classes35.77%
▷ Concrete classes4994.23%
▷ Final classes00.00%
Methods472
▷ Static methods5010.59%
▷ Public methods45796.82%
▷ Protected methods10.21%
▷ Private methods142.97%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants28
▷ Global constants1450.00%
▷ Class constants1450.00%
▷ Public constants14100.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