84% post-raw-viewer

Code Review | Post Raw Viewer

WordPress plugin Post Raw Viewer scored 84% from 54 tests.

About plugin

  • Plugin page: post-raw-viewer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.0
  • WordPress version: 6.3.1
  • First release: Jul 18, 2020
  • Latest release: Jul 18, 2020
  • Number of updates: 10
  • Update frequency: every 0.9 days
  • Top authors: preja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 356 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.09MB] [CPU: ▼8.35ms] Passed 4 tests

A check of server-side resources used by Post Raw Viewer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.58 ▼9.82
Dashboard /wp-admin3.32 ▲0.0247.19 ▼5.65
Posts /wp-admin/edit.php3.37 ▲0.0151.14 ▲5.73
Add New Post /wp-admin/post-new.php5.47 ▼0.4176.85 ▼20.92
Media Library /wp-admin/upload.php3.24 ▲0.0136.40 ▲3.00

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Post Raw Viewer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.25 ▼0.961.62 ▼0.5041.81 ▼9.27
Dashboard /wp-admin2,206 ▲155.83 ▼0.07100.00 ▼0.4738.72 ▼0.84
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0839.28 ▲3.0435.19 ▲1.45
Add New Post /wp-admin/post-new.php6,595 ▲5,06020.24 ▼2.96884.37 ▲229.9766.94 ▲18.95
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0197.28 ▲2.9142.08 ▼4.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PRVP_HtmlUtil' not found in wp-content/plugins/post-raw-viewer/templates/postmeta.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/post-raw-viewer/templates/postdata.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-raw-viewer/post-raw-viewer.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

post-raw-viewer/post-raw-viewer.php Passed 13 tests

The main PHP script in "Post Raw Viewer" version 1.0.0 is automatically included on every request by WordPress
60 characters long description:
As an Admin you can see raw post data displayed in meta box

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected173 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP863127158
CSS10015

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.12
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods940.91%
▷ Public methods1463.64%
▷ Protected methods418.18%
▷ Private methods418.18%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin