83% rock-content

Code Review | Rock Content

WordPress plugin Rock Content scored83%from 54 tests.

About plugin

  • Plugin page: rock-content
  • Plugin version: 3.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2016
  • Latest release: Dec 15, 2022
  • Number of updates: 70
  • Update frequency: every 33.2 days
  • Top authors: rockcontentplatform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /34,726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.51MB] [CPU: ▼1.11ms] Passed 4 tests

Server-side resources used by Rock Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5347.79 ▲7.44
Dashboard /wp-admin3.82 ▲0.5150.67 ▼5.97
Posts /wp-admin/edit.php3.87 ▲0.5154.34 ▲9.05
Add New Post /wp-admin/post-new.php6.42 ▲0.5388.17 ▼14.96
Media Library /wp-admin/upload.php3.74 ▲0.5141.22 ▲9.57

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 12 new options
New WordPress options
rcp_activated_at
theysaidso_admin_options
widget_recent-comments
rcp_token
widget_recent-posts
rcp_deactivated_at
rcp_integrated_at
can_compress_scripts
rcp_timestamp
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by Rock Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲21013.49 ▼0.868.74 ▲7.0749.13 ▲5.27
Dashboard /wp-admin2,233 ▲565.82 ▲0.2393.38 ▲6.7570.47 ▲35.50
Posts /wp-admin/edit.php2,153 ▲532.08 ▲0.0941.83 ▲2.3835.46 ▼2.89
Add New Post /wp-admin/post-new.php1,583 ▲4821.71 ▲3.69622.38 ▲12.5939.61 ▼20.72
Media Library /wp-admin/upload.php1,447 ▲474.23 ▲0.0699.78 ▲8.5383.55 ▲43.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 11 options
    • rcp_activated_at
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • rcp_token
    • rcp_integrated_at
    • rcp_timestamp
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'RockContent\\Admin\otificationAdmin' not found in wp-content/plugins/rock-content/inc/Admin/PluginAdmin.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: content marketing, publication

rock-content/RockContent.php 77% from 13 tests

The entry point to "Rock Content" version 3.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("rock-content.php" instead of "RockContent.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin4,651 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP284951,7212,510
Sass31511,634
JavaScript5431353
JSON400113
Markdown118040
CSS1011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.65
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods162
▷ Static methods4930.25%
▷ Public methods13985.80%
▷ Protected methods10.62%
▷ Private methods2213.58%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants9
▷ Global constants9100.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
6 PNG files occupy 0.19MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/rockcontent.png1.18KB0.78KB▼ 33.47%
assets/admin/img/stage_Illustration.png27.82KB11.82KB▼ 57.52%
assets/admin/img/logo-rockcontent-blue.png7.28KB3.30KB▼ 54.68%
.wordpress-org/banner-772x250.png134.17KB36.13KB▼ 73.07%
assets/admin/img/empty_state.png5.51KB2.96KB▼ 46.37%