83% text-rocks

Code Review | TextRocks Widget

WordPress plugin TextRocks Widget scored83%from 54 tests.

About plugin

  • Plugin page: text-rocks
  • Plugin version: 4.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2021
  • Latest release: Jun 23, 2021
  • Number of updates: 4
  • Update frequency: every 10.0 days
  • Top authors: txtrocks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /256 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.69ms] Passed 4 tests

An overview of server-side resources used by TextRocks Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.47 ▲5.90
Dashboard /wp-admin3.31 ▼0.0346.68 ▼16.44
Posts /wp-admin/edit.php3.36 ▲0.0046.50 ▲0.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.02 ▼15.86
Media Library /wp-admin/upload.php3.23 ▲0.0035.01 ▼2.55
TextRocks /wp-admin/options-general.php?page=textrocks-settings3.2029.84

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for TextRocks Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.271.98 ▲0.1847.12 ▲4.20
Dashboard /wp-admin2,210 ▲224.84 ▼1.13113.82 ▼4.6342.86 ▼1.49
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0339.58 ▲5.2034.36 ▼1.84
Add New Post /wp-admin/post-new.php1,536 ▲1723.12 ▲0.12704.21 ▲41.5271.87 ▲9.66
Media Library /wp-admin/upload.php1,389 ▲44.23 ▼0.00106.07 ▲2.5947.81 ▲3.06
TextRocks /wp-admin/options-general.php?page=textrocks-settings8292.0526.8031.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-rocks/textrocks.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #2 in text-rocks/assets to your readme.txt
The official readme.txt might help

text-rocks/textrocks.php 85% from 13 tests

"TextRocks Widget" version 4.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("text-rocks.php" instead of "textrocks.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected110 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1010110

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin