68% prm

Code Review | PRM

WordPress plugin PRM scored68%from 54 tests.

About plugin

  • Plugin page: prm
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Oct 19, 2016
  • Number of updates: 39
  • Update frequency: every 0.3 days
  • Top authors: danillonunes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /571 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by PRM
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0538.53 ▼2.97
Dashboard /wp-admin3.40 ▲0.0651.89 ▼3.01
Posts /wp-admin/edit.php3.52 ▲0.1251.92 ▼11.59
Add New Post /wp-admin/post-new.php5.98 ▲0.0688.30 ▼29.41
Media Library /wp-admin/upload.php3.33 ▲0.0635.64 ▼1.84
PRM /wp-admin/options-general.php?page=prm3.3650.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: 1 new table, 7 new options
New tables
wp_prm_subscriptions
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
prm_db_version

Browser metrics Passed 4 tests

A check of browser resources used by PRM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.47 ▼0.8610.08 ▲8.4242.71 ▼0.73
Dashboard /wp-admin2,199 ▲195.63 ▼0.0090.56 ▼0.2239.89 ▼11.05
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.1433.93 ▼16.3437.94 ▼8.92
Add New Post /wp-admin/post-new.php1,534 ▲823.09 ▼0.05633.92 ▼33.6349.88 ▼7.13
Media Library /wp-admin/upload.php1,398 ▼24.20 ▼0.0195.33 ▼10.2842.64 ▼4.06
PRM /wp-admin/options-general.php?page=prm1,2811.9132.8633.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 failed, leaving 1 table in the database
    • wp_prm_subscriptions
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • prm_db_version
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/prm/includes/prm.donation-form.html.php
    • > /wp-content/plugins/prm/includes/prm.donation-form.message.html.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/prm/prm.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/prm/includes/prm.install.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prm/includes/prm.assets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prm/includes/prm.donation-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prm/includes/prm.options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/prm/includes/prm.shortcodes.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: donator, donation, patron, management

prm/prm.php Passed 13 tests

The primary PHP file in "PRM" version 1.0.2 is used by WordPress to initiate all plugin functionality
41 characters long description:
PRM: The Patrão Relationship Management!

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
Success! There were no dangerous files found in this plugin1,426 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10178351,057
JavaScript3202165
CSS100121
Markdown117083

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin