84% addiction-recovery-connector

Code Review | Addiction Recovery Connector

WordPress plugin Addiction Recovery Connector scored84%from 54 tests.

About plugin

  • Plugin page: addiction-recover...
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Sep 4, 2021
  • Latest release: Aug 25, 2023
  • Number of updates: 20
  • Update frequency: every 36.1 days
  • Top authors: addictionrecovery21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,050 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.34ms] Passed 4 tests

This is a short check of server-side resources used by Addiction Recovery Connector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1046.79 ▲2.07
Dashboard /wp-admin3.38 ▲0.0850.09 ▲0.81
Posts /wp-admin/edit.php3.49 ▲0.1450.65 ▼1.63
Add New Post /wp-admin/post-new.php5.98 ▲0.1085.37 ▼19.78
Media Library /wp-admin/upload.php3.30 ▲0.0739.52 ▼0.75

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_related_creator
widget_recent_posts_ar
widget_related_creator_title_link
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Addiction Recovery Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4514.47 ▲0.291.74 ▼0.8741.58 ▼3.74
Dashboard /wp-admin2,225 ▲374.86 ▼1.02101.08 ▼10.1339.22 ▼4.88
Posts /wp-admin/edit.php2,105 ▲162.00 ▲0.0338.70 ▲2.0735.78 ▼2.82
Add New Post /wp-admin/post-new.php1,555 ▲2223.04 ▲1.68657.46 ▼43.5364.06 ▲10.54
Media Library /wp-admin/upload.php1,398 ▲134.20 ▼0.0397.03 ▼3.6343.67 ▼8.08

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
These items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • db_upgraded
    • widget_related_creator
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_related_creator_title_link
    • widget_recent_posts_ar
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/addiction-recovery-connector/inc/creator-related.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addiction-recovery-connector/inc/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/addiction-recovery-connector/templates/authors-template.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/addiction-recovery-connector/templates/instagram-feed-template.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addiction-recovery-connector/inc/creator-instagram.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addiction-recovery-connector/inc/token-validation-endpoint.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/addiction-recovery-connector/templates/reviewers-template.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/addiction-recovery-connector/plugin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addiction-recovery-connector/inc/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addiction-recovery-connector/custom_routes/class.main.php:571

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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
4 plugin tags: content publishing, publishing, post scheduling, blog

addiction-recovery-connector/plugin.php 85% from 13 tests

"Addiction Recovery Connector" version 1.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("addiction-recovery-connector.php" instead of "plugin.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.4" instead of "3.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,754 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP165224742,416
CSS4172271
JavaScript42253
SVG10014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity38.88
▷ Minimum class complexity2.00
▷ Maximum class complexity154.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods85
▷ Static methods00.00%
▷ Public methods6576.47%
▷ Protected methods00.00%
▷ Private methods2023.53%
Functions23
▷ Named functions1356.52%
▷ Anonymous functions1043.48%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/addiction-recovery-placeholder.png2.46KB0.15KB▼ 94.08%