68% read-and-understood

Code Review | Read and Understood

WordPress plugin Read and Understood scored 68% from 53 tests.

About plugin

  • Plugin page: read-and-understood
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jan 10, 2014
  • Latest release: Apr 11, 2018
  • Number of updates: 73
  • Update frequency: every 21.3 days
  • Top authors: petermantos (100%)

Code review

53 tests

User reviews

6 reviews

Install metrics

60+ active / 2,194 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼303.37ms] Passed 4 tests

An overview of server-side resources used by Read and Understood
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.08 ▲0.3640.33 ▲21.12
Dashboard /wp-admin3.24 ▲0.1962.47 ▲20.05
Posts /wp-admin/edit.php3.35 ▲0.2455.73 ▲9.89
Add New Post /wp-admin/post-new.php4.83 ▼0.6064.86 ▼1,245.00
Media Library /wp-admin/upload.php3.18 ▲0.1742.31 ▲1.60
Read and Understood /wp-admin/options-general.php?page=read-and-understood-menu-slug-013.1338.46

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 28 new files
Database: 2 new tables, 5 new options
New tables
wp_rnu_categories
wp_rnu_acknowledgements
New WordPress options
rnu_username_validation_pattern
rnu_db_version
rnu_plugin_version
rnu_require_login
rnu_username_validation_title

Browser metrics Passed 4 tests

This is an overview of browser requirements for Read and Understood
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲21617.10 ▲1.5912.51 ▲1.9648.46 ▲3.79
Dashboard /wp-admin2,964 ▲1116.05 ▲0.22139.86 ▼6.1998.16 ▲1.75
Posts /wp-admin/edit.php2,740 ▲342.72 ▲0.0368.81 ▼0.87112.59 ▲16.71
Add New Post /wp-admin/post-new.php1,693 ▲4218.97 ▲1.55370.38 ▲24.23125.13 ▲25.97
Media Library /wp-admin/upload.php1,806 ▲315.12 ▲0.14128.56 ▼13.44108.77 ▼3.67
Read and Understood /wp-admin/options-general.php?page=read-and-understood-menu-slug-011,1162.5269.5965.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'class_wp_rnu' does not have a method 'rnudb_deactivate'
  • This plugin does not fully uninstall, leaving 4 options in the database
    • rnu_plugin_version
    • rnu_username_validation_title
    • rnu_username_validation_pattern
    • rnu_require_login

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=read-and-understood-menu-slug-01
    • > Notice in wp-content/plugins/read-and-understood/class_wp_rnu.php+522
    Undefined index: rnu_ExportBtn
    • > GET request to /wp-admin/options-general.php?page=read-and-understood-menu-slug-01
    • > Notice in wp-content/plugins/read-and-understood/class_wp_rnu.php+522
    Undefined index: rnu_PurgeBtn
    • > GET request to /wp-admin/options-general.php?page=read-and-understood-menu-slug-01
    • > Notice in wp-content/plugins/read-and-understood/class_wp_rnu.php+586
    Undefined index: submit_hidden
    • > GET request to /wp-admin/options-general.php?page=read-and-understood-menu-slug-01
    • > Notice in wp-content/plugins/read-and-understood/class_wp_rnu.php+796
    Undefined variable: sql

SRP 50% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/read-and-understood/class_wp_rnu.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
No tags were detected

read-and-understood/class_wp_rnu.php 85% from 13 tests

The principal PHP file in "Read and Understood" v. 2.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("read-and-understood.php" instead of "class_wp_rnu.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
No dangerous file extensions were detected1,407 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP286251905
CSS24265397
JavaScript11418105

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity161.00
▷ Minimum class complexity161.00
▷ Maximum class complexity161.00
Average method complexity7.40
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 PNG files occupy 0.69MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
images/RnU_Admin_Screen_Shot.png122.52KB49.63KB▼ 59.49%
images/RnU_Sample_Export.png90.72KB38.73KB▼ 57.31%
css/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%