56% rock-convert

Code Review | Rock Convert

WordPress plugin Rock Convert scored56%from 54 tests.

About plugin

  • Plugin page: rock-convert
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Apr 4, 2018
  • Latest release: Apr 1, 2023
  • Number of updates: 168
  • Update frequency: every 10.9 days
  • Top authors: rockcontentplatform (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

1,000+ active /57,411 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼3.22ms] Passed 4 tests

Analyzing server-side resources used by Rock Convert
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2545.34 ▲5.77
Dashboard /wp-admin3.57 ▲0.2250.13 ▼7.99
Posts /wp-admin/edit.php3.68 ▲0.3250.41 ▲2.98
Add New Post /wp-admin/post-new.php6.17 ▲0.2890.71 ▼10.15
Media Library /wp-admin/upload.php3.46 ▲0.2435.14 ▲2.28
Adbar /wp-admin/edit.php?post_type=cta&page=rock-convert-announcements3.5237.67
Settings /wp-admin/edit.php?post_type=cta&page=rock-convert-settings3.4639.63
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=cta3.4938.33
All banners /wp-admin/edit.php?post_type=cta3.5539.77
New banner /wp-admin/post-new.php?post_type=cta3.5750.92
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=cta3.4850.36

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 379 new files
Database: 1 new table, 10 new options
New tables
wp_rconvert-subscriptions
New WordPress options
can_compress_scripts
widget_recent-posts
widget_rock_cta_widget
category_children
db_upgraded
widget_theysaidso_widget
rock_convert_db_version
theysaidso_admin_options
widget_recent-comments
widget_rock_convert_subscribe_widget

Browser metrics Passed 4 tests

Rock Convert: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,088 ▲31715.51 ▲0.915.40 ▲3.2338.53 ▼5.29
Dashboard /wp-admin2,393 ▲2016.79 ▲1.88138.90 ▲31.3673.76 ▲32.92
Posts /wp-admin/edit.php2,314 ▲2253.75 ▲1.7449.96 ▲10.1067.49 ▲31.14
Add New Post /wp-admin/post-new.php6,276 ▲4,74325.97 ▲3.02895.86 ▲326.14131.52 ▲83.50
Media Library /wp-admin/upload.php1,450 ▲594.50 ▲0.3182.20 ▼12.7486.18 ▲41.91
Adbar /wp-admin/edit.php?post_type=cta&page=rock-convert-announcements1,7444.1973.7071.40
Settings /wp-admin/edit.php?post_type=cta&page=rock-convert-settings1,2545.6699.6061.93
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=cta1,5323.5946.1646.69
All banners /wp-admin/edit.php?post_type=cta1,3973.2452.8162.63
New banner /wp-admin/post-new.php?post_type=cta2,1304.5880.21104.48
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=cta1,6683.5946.8662.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_rconvert-subscriptions
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • category_children
    • widget_rock_cta_widget
    • widget_recent-posts
    • db_upgraded
    • rock_convert_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_rock_convert_subscribe_widget
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=cta&page=rock-convert-announcements
    • > Notice in wp-content/plugins/rock-convert/inc/admin/announcements/views/announcements-settings-page.php+33
    Undefined index: urls
    • > GET request to /wp-admin/edit.php?post_type=cta&page=rock-convert-announcements
    • > Warning in wp-content/plugins/rock-convert/inc/admin/class-utils.php+213
    Invalid argument supplied for foreach()

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rock-convert/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
  • 80× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tests\\AbstractTest' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Tests/Tag/Svg/PolygonErrorTest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tag\\Html\\I' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Tag/Html/Samp.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rock-convert/inc/frontend/widget/class-subscribe.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tag\\AbstractHtmlTag' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Tag/Html/Small.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tag\\AbstractSvgTag' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Tag/Svg/Path.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Spipu\\Html2Pdf\\Extension\\ExtensionInterface' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Extension/AbstractExtension.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Exception\\Html2PdfException' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Exception/ImageException.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Spipu\\Html2Pdf\\Tag\\AbstractSvgTag' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Tag/Svg/G.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Tests/Parsing/HtmlTest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/rock-convert/vendor/spipu/html2pdf/src/Tests/Exception/ExceptionFormatterTest.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=cta&page=rock-convert-settings
    • > Console-api (warning) in unknown
    http://js.hsforms.net/forms/v2.js 0:84620 "[]" "Unsupported context key: groupErrors"

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
5 plugin tags: statistics, ads, contact, form, marketing

rock-convert/rock-convert.php 92% from 13 tests

The primary PHP file in "Rock Convert" version 3.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin69,391 lines of code in 283 files:
LanguageFilesBlank linesComment linesLines of code
PHP2304,62019,80162,650
PO File81,3542,7353,387
Markdown1850001,358
CSS4181141,188
JavaScript106555539
JSON300226
XML10422
YAML12013
SVG6006
Sass2002

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,420)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 503)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity62.90
▷ Minimum class complexity1.00
▷ Maximum class complexity4,420.00
Average method complexity6.71
▷ Minimum method complexity1.00
▷ Maximum method complexity503.00
Code structure
Namespaces34
Interfaces3
Traits0
Classes133
▷ Abstract classes53.76%
▷ Concrete classes12896.24%
▷ Final classes00.00%
Methods1,492
▷ Static methods15310.25%
▷ Public methods99066.35%
▷ Protected methods45930.76%
▷ Private methods432.88%
Functions11
▷ Named functions327.27%
▷ Anonymous functions872.73%
Constants166
▷ Global constants15693.98%
▷ Class constants106.02%
▷ Public constants10100.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
15 PNG files occupy 0.47MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/banner-top.png1.13KB0.26KB▼ 76.66%
vendor/spipu/html2pdf/src/Tests/Image/res/logo.png20.53KB7.63KB▼ 62.85%
assets/wp-page/screenshot-2.png53.72KB16.53KB▼ 69.23%
assets/admin/img/banner-middle.png1.14KB0.24KB▼ 79.13%
assets/wp-page/banner-772x250.png9.35KB4.14KB▼ 55.73%