62% chiron

Code Review | Chiron

WordPress plugin Chiron scored 62% from 54 tests.

About plugin

  • Plugin page: chiron
  • Plugin version: 0.9i...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2015
  • Latest release: Jul 10, 2015
  • Number of updates: 12
  • Update frequency: every 49.7 days
  • Top authors: benjamin.birkenhake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 783 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.56ms] Passed 4 tests

This is a short check of server-side resources used by Chiron
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.04 ▲0.26
Dashboard /wp-admin3.48 ▲0.1747.53 ▼2.08
Posts /wp-admin/edit.php3.53 ▲0.1751.11 ▲2.59
Add New Post /wp-admin/post-new.php5.99 ▲0.1185.73 ▼14.99
Media Library /wp-admin/upload.php3.33 ▲0.1136.02 ▲3.03
Edit Source /wp-admin/admin.php?page=chiron_edit_source3.3033.26
Manage Subscription /wp-admin/admin.php?page=chiron_manage_subscription3.3030.76
Delete Subscription /wp-admin/admin.php?page=chiron_delete_subscription3.2831.80
Add new Source and Subscription /wp-admin/admin.php?page=chiron_add_source_and_subscription3.3231.72
News-Dashboard /wp-admin/admin.php?page=chiron_dashboard3.2932.46
Debugging /wp-admin/admin.php?page=chiron_debugging3.2931.63
Add new Category /wp-admin/admin.php?page=chiron_add_category3.3029.35
All Sources /wp-admin/admin.php?page=chiron_manage_sources3.3232.45
Settings /wp-admin/admin.php?page=chiron_settings3.3033.15
Add new Source /wp-admin/admin.php?page=chiron_add_source3.3031.06

Server storage [IO: ▲0.20MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: 7 new tables, 7 new options
New tables
wp_chiron_source_meta
wp_chiron_item_meta
wp_chiron_source
wp_chiron_item
wp_chiron_subscription
wp_chiron_category
wp_chiron_source_type
New WordPress options
widget_recent-posts
chiron
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Chiron
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲17113.21 ▼1.151.91 ▲0.1643.03 ▲1.21
Dashboard /wp-admin2,290 ▲1084.89 ▼0.01107.19 ▼7.6042.19 ▼5.45
Posts /wp-admin/edit.php2,128 ▲391.99 ▲0.0039.62 ▼4.3736.23 ▲1.78
Add New Post /wp-admin/post-new.php1,565 ▲3723.27 ▲4.91651.78 ▲26.0349.68 ▼2.26
Media Library /wp-admin/upload.php1,427 ▲484.26 ▲0.0296.54 ▼3.3542.36 ▼2.21
Edit Source /wp-admin/admin.php?page=chiron_edit_source7912.0525.6822.41
Manage Subscription /wp-admin/admin.php?page=chiron_manage_subscription7892.0224.1822.10
Delete Subscription /wp-admin/admin.php?page=chiron_delete_subscription7972.1425.0923.36
Add new Source and Subscription /wp-admin/admin.php?page=chiron_add_source_and_subscription8132.0525.1023.04
News-Dashboard /wp-admin/admin.php?page=chiron_dashboard8222.0624.7924.79
Debugging /wp-admin/admin.php?page=chiron_debugging8762.1723.0428.70
Add new Category /wp-admin/admin.php?page=chiron_add_category8092.0524.3021.92
All Sources /wp-admin/admin.php?page=chiron_manage_sources8022.0523.8624.42
Settings /wp-admin/admin.php?page=chiron_settings7892.0323.7323.98
Add new Source /wp-admin/admin.php?page=chiron_add_source8092.0624.6022.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall successfully, leaving 7 tables in the database
    • wp_chiron_item_meta
    • wp_chiron_source
    • wp_chiron_source_type
    • wp_chiron_subscription
    • wp_chiron_category
    • wp_chiron_item
    • wp_chiron_source_meta
  • The uninstall procedure has failed, leaving 7 options in the database
    • chiron
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=chiron_delete_subscription
    • > Notice in wp-content/plugins/chiron/chiron.php+768
    Undefined variable: source_id
    • > GET request to /wp-admin/admin.php?page=chiron_delete_subscription
    • > Notice in wp-content/plugins/chiron/chiron.php+777
    Undefined variable: source
    • > GET request to /wp-admin/admin.php?page=chiron_delete_subscription
    • > Notice in wp-content/plugins/chiron/chiron.php+777
    Trying to get property 'title' of non-object
    • > GET request to /wp-admin/admin.php?page=chiron_dashboard
    • > Notice in wp-content/plugins/chiron/chiron.php+201
    Undefined index: day
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=chiron_debugging
    • > Notice in wp-content/plugins/chiron/core/classes/chiron_core.db-class.php+41
    Undefined variable: result

SRP 0% 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 items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/chiron/core/templates/footer.tpl.php
    • > /wp-content/plugins/chiron/chiron.php
    • > /wp-content/plugins/chiron/core/templates/header.tpl.php
    • > /wp-content/plugins/chiron/core/classes/bootstrap.php
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant CHIRON_DB_USR - assumed 'CHIRON_DB_USR' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/core/classes/bootstrap.php on line 15
    • > PHP Warning
      Use of undefined constant DB_NAME - assumed 'DB_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/chiron.php on line 16
    • > PHP Warning
      Use of undefined constant CHIRON_DB_SRV - assumed 'CHIRON_DB_SRV' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/core/classes/bootstrap.php on line 15
    • > PHP Warning
      mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in wp-content/plugins/chiron/core/classes/chiron_db.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/chiron.php on line 21
    • > PHP Warning
      mysqli::select_db(): Couldn't fetch mysqli in wp-content/plugins/chiron/core/classes/chiron_db.php on line 13
    • > PHP Warning
      Use of undefined constant DB_PWD - assumed 'DB_PWD' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/core/classes/config-default.php on line 14
    • > PHP Warning
      Use of undefined constant CHIRON_DB_PRE - assumed 'CHIRON_DB_PRE' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/core/classes/bootstrap.php on line 15
    • > PHP Warning
      Use of undefined constant DB_DBS - assumed 'DB_DBS' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/core/classes/config-default.php on line 16
    • > PHP Warning
      Use of undefined constant DB_USER - assumed 'DB_USER' (this will throw an Error in a future version of PHP) in wp-content/plugins/chiron/chiron.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The main personalized Dashboard of Chiron.)
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

chiron/chiron.php 92% from 13 tests

The primary PHP file in "Chiron" version 0.9i... is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "0.9i...")

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,697 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP183951091,676
Markdown116017
CSS1304

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.91
▷ Minimum class complexity2.00
▷ Maximum class complexity23.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods86
▷ Static methods00.00%
▷ Public methods86100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
2 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
chiron-favicon.png0.92KB1.23KB0.00%
assets/screenshot-1.png122.47KB34.35KB▼ 71.95%