90% rng-refresh

Code Review | rng-refresh

WordPress plugin rng-refresh scored90%from 54 tests.

About plugin

  • Plugin page: rng-refresh
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2019
  • Latest release: May 8, 2019
  • Number of updates: 6
  • Update frequency: every 9.5 days
  • Top authors: asabagh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /991 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.69MB] [CPU: ▼18.70ms] Passed 4 tests

A check of server-side resources used by rng-refresh
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.43 ▼2.98
Dashboard /wp-admin3.33 ▼0.0251.41 ▼12.87
Posts /wp-admin/edit.php3.38 ▲0.0243.85 ▼0.11
Add New Post /wp-admin/post-new.php3.11 ▼2.7833.11 ▼56.73
Media Library /wp-admin/upload.php3.25 ▲0.0236.22 ▼2.22
Refresh Settings /wp-admin/options-general.php?page=refresh-settings3.2534.22

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
rng_refresh_configure_dismiss
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by rng-refresh
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.21 ▼0.141.77 ▲0.1643.32 ▼0.56
Dashboard /wp-admin2,207 ▲335.61 ▼0.0493.94 ▼7.9542.61 ▼1.48
Posts /wp-admin/edit.php2,112 ▲151.97 ▼0.0034.97 ▲1.6133.77 ▼3.28
Add New Post /wp-admin/post-new.php1,547 ▲1918.40 ▼5.15637.68 ▼30.7168.47 ▲9.17
Media Library /wp-admin/upload.php1,412 ▲154.18 ▲0.05104.14 ▼3.4447.74 ▲2.15
Refresh Settings /wp-admin/options-general.php?page=refresh-settings8112.0025.7529.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in rng-refresh/assets to your readme.txt
You can take inspiration from this readme.txt

rng-refresh/rng-refresh.php Passed 13 tests

"rng-refresh" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
104 characters long description:
WordPress Plugin that refreshes the single template of public post types with a synchronism time period.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin356 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP948103250
PO File1202164
JavaScript11116
Markdown17014
CSS10112

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin