78% ravpage

Code Review | ravpage

WordPress plugin ravpage scored 78% from 54 tests.

About plugin

  • Plugin page: ravpage
  • Plugin version: 2.31
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 22, 2012
  • Latest release: Jun 11, 2023
  • Number of updates: 75
  • Update frequency: every 51.1 days
  • Top authors: matiskiba (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active / 7,389 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.29ms] Passed 4 tests

Analyzing server-side resources used by ravpage
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1742.15 ▲0.95
Dashboard /wp-admin3.48 ▲0.1850.26 ▲0.90
Posts /wp-admin/edit.php3.59 ▲0.2448.18 ▼2.29
Add New Post /wp-admin/post-new.php6.06 ▲0.1781.54 ▼16.72
Media Library /wp-admin/upload.php3.40 ▲0.1736.14 ▲2.78
Ravpage /wp-admin/options-general.php?page=ravpage3.7136.70

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 431 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by ravpage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.80 ▲0.422.02 ▲0.0638.79 ▼2.60
Dashboard /wp-admin2,219 ▲315.90 ▲1.02103.34 ▼2.7946.73 ▲9.07
Posts /wp-admin/edit.php2,105 ▲132.02 ▲0.0035.79 ▼1.4439.30 ▲5.09
Add New Post /wp-admin/post-new.php1,384 ▼15517.54 ▼5.68565.36 ▼122.3253.90 ▼4.85
Media Library /wp-admin/upload.php1,404 ▲164.17 ▲0.0194.67 ▼7.3742.98 ▼2.07
Ravpage /wp-admin/options-general.php?page=ravpage7882.0125.3633.32

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 12× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/old-extract-schema.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/add-vimline.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/old-remove-schema-def.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/remove-trailing-whitespace.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/old-remove-require-once.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/flush-definition-cache.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/generate-standalone.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/rename-config.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/config-scanner.php
    • > /wp-content/plugins/ravpage/htmlpurifier/maintenance/generate-schema-cache.php
  • 176× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIScheme' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/URIScheme/http.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrTransform' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule_Tidy' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_Strategy' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrTransform' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_ChildDef_Required' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrTransform' not found in wp-content/plugins/ravpage/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === ravpage === )
You can look at the official readme.txt

ravpage/ravpage.php Passed 13 tests

The main PHP script in "ravpage" version 2.31 is automatically included on every request by WordPress
50 characters long description:
plugin to easy page publishing for ravpage clients

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected21,241 lines of code in 284 files:
LanguageFilesBlank linesComment linesLines of code
PHP2754,21812,12221,127
diff1134346
Bourne Shell30024
Markdown19020
INI2226815
CSS1316
JavaScript1113

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 232)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity15.98
▷ Minimum class complexity1.00
▷ Maximum class complexity539.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity232.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes243
▷ Abstract classes156.17%
▷ Concrete classes22893.83%
▷ Final classes00.00%
Methods852
▷ Static methods495.75%
▷ Public methods62273.00%
▷ Protected methods859.98%
▷ Private methods14517.02%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants97
▷ Global constants66.19%
▷ Class constants9193.81%
▷ Public constants91100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin