84% ridhi-companion

Code Review | Ridhi Companion

WordPress plugin Ridhi Companion scored84%from 54 tests.

About plugin

  • Plugin page: ridhi-companion
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-6.2
  • WordPress version: 6.3.1
  • First release: Dec 17, 2019
  • Latest release: May 31, 2023
  • Number of updates: 11
  • Update frequency: every 114.6 days
  • Top authors: raratheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /14,670 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼2.19ms] Passed 4 tests

This is a short check of server-side resources used by Ridhi Companion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3637.94 ▼2.85
Dashboard /wp-admin3.66 ▲0.3649.81 ▼5.51
Posts /wp-admin/edit.php3.77 ▲0.4247.14 ▲1.94
Add New Post /wp-admin/post-new.php6.24 ▲0.3682.26 ▼1.55
Media Library /wp-admin/upload.php3.58 ▲0.3636.21 ▲1.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Ridhi Companion: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.081.85 ▼0.2142.30 ▼2.19
Dashboard /wp-admin2,192 ▲155.52 ▼0.0585.43 ▼13.0140.52 ▼1.76
Posts /wp-admin/edit.php2,103 ▲241.99 ▲0.0038.93 ▲3.5736.87 ▲5.69
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▲0.03576.66 ▼40.3553.86 ▼0.64
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.0796.95 ▼13.6641.70 ▼5.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ridhi-companion/inc/class-ridhi-companion.php on line 30
    • > PHP Fatal error
      Uncaught Error: Class 'Ridhi_Companion_Dummy_Array' not found in wp-content/plugins/ridhi-companion/sections/team.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Ridhi_Companion_Dummy_Array' not found in wp-content/plugins/ridhi-companion/sections/about.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/ridhi-companion/inc/class-ridhi-companion.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ridhi-companion/sections/social.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Ridhi_Companion_Dummy_Array' not found in wp-content/plugins/ridhi-companion/sections/client.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/ridhi-companion/sections/contact.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Ridhi_Companion_Dummy_Array' not found in wp-content/plugins/ridhi-companion/sections/testimonial.php:8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/ridhi-companion/inc/class-ridhi-companion.php on line 30
    • > PHP Fatal error
      Uncaught Error: Class 'Ridhi_Companion_Dummy_Array' not found in wp-content/plugins/ridhi-companion/inc/customizer/class-ridhi-companion-customizer.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: ridhi-companion, companion, companion-plugin

ridhi-companion/ridhi-companion.php 92% from 13 tests

"Ridhi Companion" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.9" instead of "5.2.3")

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
No dangerous file extensions were detected7,130 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP203323973,819
JavaScript66531,0123,071
CSS3352240

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity9.56
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods56
▷ Static methods2341.07%
▷ Public methods5394.64%
▷ Protected methods35.36%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/algolia.png3.78KB2.44KB▼ 35.49%
images/akamai.png5.25KB3.06KB▼ 41.68%
images/amazon-web-services.png6.68KB3.49KB▼ 47.81%
images/android.png3.18KB2.09KB▼ 34.41%
images/behance.png3.44KB2.25KB▼ 34.54%