90% wp-rest-api-jquery-support

Code Review | RESTjQuery

WordPress plugin RESTjQuery scored90%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-jquer...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: Mar 20, 2019
  • Number of updates: 5
  • Update frequency: every 146.2 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.31ms] Passed 4 tests

Server-side resources used by RESTjQuery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.20 ▼13.86
Dashboard /wp-admin3.37 ▲0.0647.39 ▲1.26
Posts /wp-admin/edit.php3.48 ▲0.1350.07 ▲3.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.03 ▼14.09
Media Library /wp-admin/upload.php3.29 ▲0.0636.44 ▲1.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for RESTjQuery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.60 ▼0.664.93 ▲2.8839.81 ▼8.44
Dashboard /wp-admin2,209 ▲215.88 ▲0.0696.32 ▼11.5536.78 ▼6.76
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0140.34 ▲0.1834.07 ▼4.95
Add New Post /wp-admin/post-new.php1,534 ▲2023.26 ▲5.73661.05 ▼27.0053.16 ▼4.92
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.0696.98 ▼1.8342.23 ▼2.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • restjquery_date_installed
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: api, rest, jquery, json, rest-api...

wp-rest-api-jquery-support/wp-rest-api-jquery-script-plugin.php 92% from 13 tests

The main file in "RESTjQuery" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-rest-api-jquery-support.php" instead of "wp-rest-api-jquery-script-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin469 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP465240306
JavaScript24016163

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity9.50
▷ Minimum class complexity3.00
▷ Maximum class complexity24.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin