78% ft-rockpress

Code Review | RockPress

WordPress plugin RockPress scored78%from 54 tests.

About plugin

  • Plugin page: ft-rockpress
  • Plugin version: 1.0.17
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.8
  • WordPress version: 6.3.1
  • First release: Aug 17, 2017
  • Latest release: Jul 20, 2021
  • Number of updates: 19
  • Update frequency: every 75.4 days
  • Top authors: danielmilner (94.74%)firetree (10.53%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,508 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.60MB] [CPU: ▲2.02ms] 75% from 4 tests

This is a short check of server-side resources used by RockPress
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,136.30ms on /wp-admin/admin.php?page=rockpress-addons)
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4647.16 ▲1.26
Dashboard /wp-admin3.95 ▲0.6552.31 ▼2.74
Posts /wp-admin/edit.php4.00 ▲0.6454.50 ▼0.63
Add New Post /wp-admin/post-new.php6.54 ▲0.66112.62 ▲19.86
Media Library /wp-admin/upload.php3.87 ▲0.6447.86 ▲10.20
Welcome /wp-admin/admin.php?page=rockpress3.7739.77
Settings /wp-admin/admin.php?page=rockpress-settings3.7837.56
Add-ons /wp-admin/admin.php?page=rockpress-addons3.851,136.30

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
rockpress_settings
rockpress_licenses
rockpress_rock

Browser metrics Passed 4 tests

Checking browser requirements for RockPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲20413.58 ▼0.801.72 ▼0.2642.85 ▼5.94
Dashboard /wp-admin2,353 ▲1684.89 ▼0.96113.62 ▲10.6144.77 ▲2.55
Posts /wp-admin/edit.php2,239 ▲1502.07 ▲0.0542.80 ▲5.9036.65 ▼0.72
Add New Post /wp-admin/post-new.php1,548 ▲2023.27 ▲0.18685.07 ▼39.1458.50 ▼0.14
Media Library /wp-admin/upload.php1,538 ▲1474.30 ▲0.12112.63 ▲0.3448.73 ▲0.77
Welcome /wp-admin/admin.php?page=rockpress9912.0726.4762.86
Settings /wp-admin/admin.php?page=rockpress-settings1,0192.2325.0725.94
Add-ons /wp-admin/admin.php?page=rockpress-addons9052.1125.5122.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • rockpress_settings
    • rockpress_licenses
    • rockpress_rock
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ft-rockpress/templates/service-times.php
    • > /wp-content/plugins/ft-rockpress/templates/campus-selector.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ft-rockpress/templates/service-times.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/ft-rockpress/lib/wp-background-processing/wp-background-process.php:4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ft-rockpress/templates/campus-selector.php on line 10
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/ft-rockpress/templates/service-times.php on line 10
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/ft-rockpress/templates/campus-selector.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: rockrms, church, rock rms, chms

ft-rockpress/ft-rockpress.php Passed 13 tests

The principal PHP file in "RockPress" v. 1.0.17 is loaded by WordPress automatically on each request
57 characters long description:
Display information from Rock RMS on your WordPress site.

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
There were no executable files found in this plugin3,892 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,0752,0423,289
JavaScript710334460
CSS32113138
Markdown1205

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.35
▷ Minimum class complexity1.00
▷ Maximum class complexity99.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes39.68%
▷ Concrete classes2890.32%
▷ Final classes13.57%
Methods185
▷ Static methods158.11%
▷ Public methods13472.43%
▷ Protected methods2815.14%
▷ Private methods2312.43%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
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
8 PNG files occupy 0.28MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/rock-shop-plugin.png69.67KB37.40KB▼ 46.31%
assets/images/widget-service-times.png43.92KB12.32KB▼ 71.94%
assets/images/rock-security-role.png31.14KB9.58KB▼ 69.22%
assets/images/rock-permissions.png13.29KB7.39KB▼ 44.39%
assets/images/rest-key-information.png38.29KB12.11KB▼ 68.37%