78% raratheme-companion

Code Review | RaraTheme Companion

WordPress plugin RaraTheme Companion scored78%from 54 tests.

About plugin

  • Plugin page: raratheme-companion
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 16, 2018
  • Latest release: May 2, 2023
  • Number of updates: 293
  • Update frequency: every 6.3 days
  • Top authors: raratheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20,000+ active /416,677 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.33MB] [CPU: ▲0.21ms] Passed 4 tests

This is a short check of server-side resources used by RaraTheme Companion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3750.60 ▲3.78
Dashboard /wp-admin3.63 ▲0.3353.61 ▲4.34
Posts /wp-admin/edit.php3.72 ▲0.3655.36 ▲6.83
Add New Post /wp-admin/post-new.php6.29 ▲0.4091.67 ▼4.30
Media Library /wp-admin/upload.php3.49 ▲0.2736.93 ▼2.99
Add New /wp-admin/post-new.php?post_type=rara-portfolio6.2886.84
All Portfolios /wp-admin/edit.php?post_type=rara-portfolio3.6641.73
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=rara_portfolio_categories&post_type=rara-portfolio3.5941.26

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 30 new options
New WordPress options
widget_rrtc_icon_text_widget
widget_rara_posts_category_slider_widget
theysaidso_admin_options
widget_recent-posts
widget_raratheme_author_bio
widget_raratheme_custom_categories
widget_raratheme_featured_page_widget
widget_raratheme_advertisement_widget
widget_raratheme_client_logo_widget
widget_raratheme_featured_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for RaraTheme Companion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,075 ▲1,31417.11 ▲2.4743.56 ▲41.8444.36 ▲3.13
Dashboard /wp-admin3,307 ▲1,1275.72 ▲0.0586.94 ▲1.4141.38 ▼0.22
Posts /wp-admin/edit.php5,179 ▲3,0797.92 ▲5.89183.10 ▲143.6044.33 ▲7.14
Add New Post /wp-admin/post-new.php3,512 ▲1,98625.87 ▲2.81769.68 ▲77.7437.45 ▼22.32
Media Library /wp-admin/upload.php2,514 ▲1,1204.10 ▼0.1379.91 ▼23.8542.05 ▼5.53
Add New /wp-admin/post-new.php?post_type=rara-portfolio8,19425.53987.0131.67
All Portfolios /wp-admin/edit.php?post_type=rara-portfolio4,1657.66113.6830.29
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=rara_portfolio_categories&post_type=rara-portfolio4,3617.47105.6130.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 30 options in the database
    • widget_raratheme_recent_post
    • widget_raratheme_author_bio
    • widget_rrtc_description_widget
    • widget_raratheme_facebook_page_widget
    • theysaidso_admin_options
    • widget_rtc_contact_social_links
    • widget_raratheme_companion_stat_counter_widget
    • widget_raratheme_companion_faqs_widget
    • widget_recent-comments
    • widget_rtc_social_links
    • ...

Smoke tests 50% 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 0% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/raratheme-companion/admin/partials/raratheme-companion-admin-display.php
    • > /wp-content/plugins/raratheme-companion/public/partials/raratheme-companion-public-display.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-popular-post.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-facebook-page.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-image.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-faqs.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-pinterest.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-stat-counter.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-testimonial.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/raratheme-companion/includes/templates/single-rara-portfolio.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/widgets/widget-contact.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raratheme-companion/includes/class-raratheme-companion-templates.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Plugin backend) image not found
The official readme.txt might help

raratheme-companion/raratheme-companion.php Passed 13 tests

The main PHP file in "RaraTheme Companion" ver. 1.4.2 adds more information about the plugin and also serves as the entry point for this plugin
65 characters long description:
23 extremely useful custom widgets to create an engaging website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected15,434 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript146171777,007
PHP407931,5816,719
CSS7141181,700
XML1008

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.84
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity6.45
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods170
▷ Static methods21.18%
▷ Public methods16597.06%
▷ Protected methods00.00%
▷ Private methods52.94%
Functions34
▷ Named functions3397.06%
▷ Anonymous functions12.94%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/chosen-sprite.png0.51KB0.88KB0.00%
public/css/image/no-featured-blank-img.png1.39KB0.10KB▼ 92.75%
admin/images/ico-delete.png0.70KB0.72KB0.00%
public/css/image/no-featured-img.png4.16KB1.39KB▼ 66.51%