84% rng-postviews

Code Review | rng-postviews

WordPress plugin rng-postviews scored 84% from 54 tests.

About plugin

  • Plugin page: rng-postviews
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: May 8, 2019
  • Number of updates: 9
  • Update frequency: every 4.6 days
  • Top authors: asabagh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.96ms] Passed 4 tests

A check of server-side resources used by rng-postviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.24 ▼2.23
Dashboard /wp-admin3.35 ▲0.0546.63 ▼4.80
Posts /wp-admin/edit.php3.40 ▲0.0550.47 ▲6.35
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.43 ▲10.04
Media Library /wp-admin/upload.php3.27 ▲0.0436.80 ▲4.52
postviews /wp-admin/options-general.php?page=ja_postviews-settings3.2733.59

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_ja_papular_posts
ja_configration_dissmiss
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for rng-postviews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲16714.63 ▲0.264.48 ▲2.9042.92 ▼7.10
Dashboard /wp-admin2,311 ▲1236.48 ▲1.57147.84 ▲31.6044.26 ▼3.99
Posts /wp-admin/edit.php2,112 ▲261.98 ▼0.0040.17 ▲4.9836.32 ▲3.15
Add New Post /wp-admin/post-new.php1,546 ▲1323.38 ▲0.08576.47 ▼45.8753.12 ▲2.15
Media Library /wp-admin/upload.php1,398 ▲134.21 ▲0.0399.50 ▼1.4043.69 ▼0.61
postviews /wp-admin/options-general.php?page=ja_postviews-settings8132.0325.0229.18

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_ja_papular_posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/rng-postviews/includes/translate.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/rng-postviews/includes/class.controller.cron.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/rng-postviews/rng-postviews.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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: rng, post viewed, postviews, view-post

rng-postviews/rng-postviews.php 92% from 13 tests

"rng-postviews" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,045 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1397256743
PO File13737101
JavaScript201989
CSS27172
Markdown112040

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.00
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods55
▷ Static methods35.45%
▷ Public methods5396.36%
▷ Protected methods00.00%
▷ Private methods23.64%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected