84% jarvis

Code Review | Jarvis

WordPress plugin Jarvis scored84%from 54 tests.

About plugin

  • Plugin page: jarvis
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2013
  • Latest release: Nov 1, 2023
  • Number of updates: 51
  • Update frequency: every 72.3 days
  • Top authors: kshaner (72.55%)wdgdc (29.41%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /17,299 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.20MB] [CPU: ▼4.39ms] Passed 4 tests

Server-side resources used by Jarvis
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1238.23 ▼11.06
Dashboard /wp-admin3.56 ▲0.2551.31 ▲5.40
Posts /wp-admin/edit.php3.62 ▲0.2649.78 ▼3.40
Add New Post /wp-admin/post-new.php6.11 ▲0.2286.58 ▼8.49
Media Library /wp-admin/upload.php3.43 ▲0.2042.85 ▲7.60

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 157 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Jarvis
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,007 ▲24614.98 ▲0.401.72 ▲0.0141.54 ▼2.33
Dashboard /wp-admin2,410 ▲2296.07 ▲0.46100.49 ▼10.9539.55 ▼0.98
Posts /wp-admin/edit.php2,321 ▲2213.37 ▲1.3748.59 ▲9.1235.23 ▼1.20
Add New Post /wp-admin/post-new.php1,554 ▲2623.36 ▲0.45682.60 ▼25.5552.92 ▼6.59
Media Library /wp-admin/upload.php1,615 ▲2125.29 ▲1.08107.88 ▲11.7743.04 ▼4.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Suggestions\\Action' not found in wp-content/plugins/jarvis/src/Suggestions/FlushRewriteRules.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Models\\Model' not found in wp-content/plugins/jarvis/src/php/models/comment.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Suggestions\\Action' not found in wp-content/plugins/jarvis/src/php/suggestions/flush-rewrite-rules.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Suggestions\\Action' not found in wp-content/plugins/jarvis/src/Suggestions/Search.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Models\\Model' not found in wp-content/plugins/jarvis/src/Models/Post.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Models\\Model' not found in wp-content/plugins/jarvis/src/php/models/menu.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Models\\Model' not found in wp-content/plugins/jarvis/src/Models/User.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Models\\Model' not found in wp-content/plugins/jarvis/src/php/models/post.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Jarvis\\plugins_url() in wp-content/plugins/jarvis/jarvis.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Jarvis\\Models\\Model' not found in wp-content/plugins/jarvis/src/Models/Action.php:5

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 Passed 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
9 plugin tags: menu, launchbar, search, wordpress, pages...

jarvis/jarvis.php Passed 13 tests

"Jarvis" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
Jarvis is your administration assistant, putting WordPress at your fingertips.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin17,410 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript592,31258312,392
PHP374659541,828
CSS13216871,025
Markdown634601,010
Sass13712525
HTML2470407
JSON600213
Bourne Again Shell11110

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.74
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes31
▷ Abstract classes26.45%
▷ Concrete classes2993.55%
▷ Final classes00.00%
Methods104
▷ Static methods2120.19%
▷ Public methods9187.50%
▷ Protected methods00.00%
▷ Private methods1312.50%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected