77% rtwidgets

Code Review | rtWidgets

WordPress plugin rtWidgets scored77%from 54 tests.

About plugin

  • Plugin page: rtwidgets
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 30, 2013
  • Latest release: Nov 17, 2014
  • Number of updates: 15
  • Update frequency: every 46.6 days
  • Top authors: rtcamp (80%)faishal (26.67%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,581 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.25MB] [CPU: ▲0.23ms] Passed 4 tests

An overview of server-side resources used by rtWidgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2639.30 ▼1.79
Dashboard /wp-admin3.55 ▲0.2551.46 ▲3.42
Posts /wp-admin/edit.php3.67 ▲0.3152.23 ▲3.57
Add New Post /wp-admin/post-new.php6.13 ▲0.2594.91 ▼4.29
Media Library /wp-admin/upload.php3.48 ▲0.2536.44 ▲3.85
rtWidgets Options /wp-admin/options-general.php?page=rtwidgets-options4.90392.02

Server storage [IO: ▲0.16MB] [DB: ▲0.15MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 10 new options
New WordPress options
widget_rtw_comments_widget
widget_rtw_multiple_nav_widget
widget_recent-comments
widget_rtw_category_widget
widget_theysaidso_widget
widget_rtw_subscribe_widget_container
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

rtWidgets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.26 ▼1.301.91 ▲0.1039.20 ▼7.29
Dashboard /wp-admin2,210 ▲225.08 ▼0.01107.83 ▼13.4942.22 ▼0.50
Posts /wp-admin/edit.php2,090 ▲42.05 ▲0.0540.71 ▲3.3735.75 ▲2.09
Add New Post /wp-admin/post-new.php1,550 ▲3118.22 ▼5.05617.24 ▼26.9564.24 ▲1.30
Media Library /wp-admin/upload.php1,392 ▲74.25 ▲0.0794.22 ▼6.8042.48 ▼0.74
rtWidgets Options /wp-admin/options-general.php?page=rtwidgets-options1,1873.3667.4639.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_rtw_category_widget
    • widget_theysaidso_widget
    • widget_rtw_subscribe_widget_container
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_rtw_multiple_nav_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_rtw_comments_widget

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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rtwidgets/lib/rtwidgets-category.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/rtwidgets/admin/rtwidgets-options.php:225
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rtwidgets/lib/rtwidgets-multiple-menu.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rtwidgets/lib/rtwidgets-subscribe.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rtwidgets/lib/rtwidgets-comments.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rtwidgets/rtwidgets-main.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=rtwidgets-options
    • > Network (severe)
    https://static.ak.fbcdn.net/connect.php/js/FB.Share?ver=6.3.1 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Tested up to: Invalid plugin version format
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

rtwidgets/rtwidgets-main.php 92% from 13 tests

"rtWidgets" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("rtwidgets.php" instead of "rtwidgets-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,645 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP6104253781
CSS83062281
PO File18185194
JSON200180
Sass51821130
SVG10037
JavaScript271435
Ruby112167

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.28
Average class complexity22.17
▷ Minimum class complexity11.00
▷ Maximum class complexity46.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
PNG images were not found in this plugin