84% tarot

Code Review | Tarot

WordPress plugin Tarot scored84%from 54 tests.

About plugin

  • Plugin page: tarot
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9+
  • WordPress version: 6.3.1
  • First release: Nov 5, 2018
  • Latest release: Nov 13, 2018
  • Number of updates: 7
  • Update frequency: every 1.1 days
  • Top authors: georgestephanis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,533 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.22ms] Passed 4 tests

A check of server-side resources used by Tarot
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1337.38 ▼0.26
Dashboard /wp-admin3.44 ▲0.1445.42 ▼3.54
Posts /wp-admin/edit.php3.56 ▲0.2052.33 ▲3.29
Add New Post /wp-admin/post-new.php6.04 ▲0.1682.99 ▼16.50
Media Library /wp-admin/upload.php3.37 ▲0.1436.56 ▼0.57
tarot /wp-admin/tools.php?page=tarot3.3629.00

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 89 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Tarot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲2414.19 ▼0.161.48 ▼0.5438.05 ▼2.44
Dashboard /wp-admin2,199 ▲255.57 ▲0.0492.71 ▲6.8740.44 ▲1.54
Posts /wp-admin/edit.php2,104 ▲72.00 ▲0.0239.50 ▲0.6437.98 ▲3.49
Add New Post /wp-admin/post-new.php6,370 ▲4,84027.98 ▲4.73837.62 ▲169.5354.77 ▲0.98
Media Library /wp-admin/upload.php1,401 ▲14.19 ▼0.02115.95 ▲8.5643.06 ▼0.39
tarot /wp-admin/tools.php?page=tarot2,2081.2826.55148.44

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 detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tarot/tarot.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tarot/blocks/tarot.php:10

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tested up to: Version not formatted correctly
You can look at the official readme.txt

tarot/tarot.php Passed 13 tests

Analyzing the main PHP file in "Tarot" version 1.0.1
45 characters long description:
A Gutenberg Block allowing Tarot card spreads

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,422 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP36829875
JavaScript171178
JSX1192146
Sass14080
SVG780078
CSS12265

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.50
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods19100.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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