72% crystal-ball-insight

Code Review | Crystal Ball Insights

WordPress plugin Crystal Ball Insights scored72%from 54 tests.

About plugin

  • Plugin page: crystal-ball-insight
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2023
  • Latest release: Jan 5, 2023
  • Number of updates: 4
  • Update frequency: every 20.7 days
  • Top authors: crystalballinsight (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /198 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.60MB] [CPU: ▲0.69ms] Passed 4 tests

An overview of server-side resources used by Crystal Ball Insights
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6144.58 ▲5.24
Dashboard /wp-admin3.92 ▲0.5851.39 ▼12.73
Posts /wp-admin/edit.php3.97 ▲0.6146.45 ▲7.61
Add New Post /wp-admin/post-new.php6.50 ▲0.61105.06 ▲8.74
Media Library /wp-admin/upload.php3.84 ▲0.6138.09 ▲2.64
Crystal Ball /wp-admin/admin.php?page=log_page3.6829.19
Settings /wp-admin/admin.php?page=crystal-ball-settings3.7533.52

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 8 new options
New tables
wp_crystal_ball_insight
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
crystal-ball-settings
can_compress_scripts
widget_theysaidso_widget
crystal_ball_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Crystal Ball Insights
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.55 ▼0.821.70 ▼0.1042.78 ▼1.26
Dashboard /wp-admin2,292 ▲1044.89 ▼0.03112.82 ▼5.6647.86 ▼0.44
Posts /wp-admin/edit.php2,118 ▲262.03 ▲0.0437.39 ▼4.4232.79 ▼3.69
Add New Post /wp-admin/post-new.php1,558 ▲2520.94 ▼2.33591.51 ▼48.5356.16 ▲7.52
Media Library /wp-admin/upload.php1,420 ▲294.26 ▼0.02100.63 ▼0.5842.41 ▼1.23
Crystal Ball /wp-admin/admin.php?page=log_page1,2321.8228.8236.51
Settings /wp-admin/admin.php?page=crystal-ball-settings8352.0728.0228.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • crystal-ball-settings
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=log_page
    • > Notice in wp-content/plugins/crystal-ball-insight/classes/class-cbi-export.php+28
    Undefined index: cbi-record-actions-submit
    • > GET request to /wp-admin/admin.php?page=log_page
    • > Notice in wp-content/plugins/crystal-ball-insight/classes/class-cbi-log-list-table.php+584
    Undefined index: typeshow
    • > GET request to /wp-admin/admin.php?page=log_page
    • > Notice in wp-content/plugins/crystal-ball-insight/classes/class-cbi-log-list-table.php+645
    Undefined index: orderby

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/crystal-ball-insight/classes/class-cbi-api.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crystal-ball-settings
    • > Network (severe)
    wp-content/plugins/crystal-ball-insight/assets/images/logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=crystal-ball-settings
    • > Network (severe)
    wp-content/plugins/crystal-ball-insight/assets/js/settings.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=crystal-ball-settings
    • > Network (severe)
    wp-content/plugins/crystal-ball-insight/assets/css/settings.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Screenshots: Please add images for these screenshots: #1 (Crystal Ball Dashboard), #2 (Annotations Over Google Analytics Chart), #3 (The settings page), #4 (Plugin Dashboard)
  • Tags: You are using too many tags: 19 tag instead of maximum 10
You can take inspiration from this readme.txt

crystal-ball-insight/crystal-ball-insight.php 92% from 13 tests

The main PHP file in "Crystal Ball Insights" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 228 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin3,063 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP296672783,063

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.34
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes310.34%
▷ Concrete classes2689.66%
▷ Final classes27.69%
Methods171
▷ Static methods179.94%
▷ Public methods15087.72%
▷ Protected methods116.43%
▷ Private methods105.85%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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
PNG images were not found in this plugin