89% pay-to-view

Code Review | Pelcro: Content Subscription Platform

WordPress plugin Pelcro: Content Subscription Platform scored89%from 54 tests.

About plugin

  • Plugin page: pay-to-view
  • Plugin version: 3.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: May 17, 2016
  • Latest release: Apr 17, 2018
  • Number of updates: 65
  • Update frequency: every 10.8 days
  • Top authors: michaelighattas (84.62%)pelcro (16.92%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.75ms] Passed 4 tests

This is a short check of server-side resources used by Pelcro: Content Subscription Platform
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.44 ▲5.20
Dashboard /wp-admin3.32 ▲0.0244.49 ▼10.33
Posts /wp-admin/edit.php3.37 ▲0.0242.38 ▼6.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.31 ▼21.09
Media Library /wp-admin/upload.php3.24 ▲0.0237.90 ▲2.83
Pelcro /wp-admin/options-general.php?page=pelcro3.2132.16

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pelcro: Content Subscription Platform
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9414.26 ▲0.0253.72 ▲51.2740.29 ▼9.84
Dashboard /wp-admin2,202 ▲255.64 ▼0.0581.51 ▼18.6036.72 ▼6.57
Posts /wp-admin/edit.php2,104 ▲12.04 ▲0.0734.81 ▼6.4632.66 ▼3.39
Add New Post /wp-admin/post-new.php1,529 ▲123.02 ▼0.14618.76 ▲5.1953.68 ▼14.91
Media Library /wp-admin/upload.php1,407 ▲44.20 ▲0.01100.59 ▼0.1643.35 ▲1.19
Pelcro /wp-admin/options-general.php?page=pelcro7812.0026.1224.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% 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:
  • Screenshots: Add an image for screenshot #1 (What is pelcro)
Please take inspiration from this readme.txt

pay-to-view/pay-to-view.php 85% from 13 tests

The entry point to "Pelcro: Content Subscription Platform" version 3.0.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin143 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP545104143

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.22MB with 0.17MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/screen-shot-1.png230.33KB57.49KB▼ 75.04%