77% excalibur-paywall

Code Review | Excalibur Paywall

WordPress plugin Excalibur Paywall scored77%from 54 tests.

About plugin

  • Plugin page: excalibur-paywall
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2017
  • Latest release: Jun 15, 2019
  • Number of updates: 21
  • Update frequency: every 29.3 days
  • Top authors: cpexcalibur (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /960 total downloads

Benchmarks

Plugin footprint 83% 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: ▼6.22ms] Passed 4 tests

A check of server-side resources used by Excalibur Paywall
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.04 ▼4.15
Dashboard /wp-admin3.36 ▲0.0149.29 ▼18.42
Posts /wp-admin/edit.php3.47 ▲0.1152.33 ▲0.24
Add New Post /wp-admin/post-new.php5.96 ▲0.0798.31 ▼2.54
Media Library /wp-admin/upload.php3.28 ▲0.0541.38 ▲7.63

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Excalibur Paywall
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲18613.81 ▼0.6016.47 ▲14.5741.22 ▲0.00
Dashboard /wp-admin2,220 ▲465.65 ▲0.0496.11 ▲1.3045.87 ▼0.28
Posts /wp-admin/edit.php2,125 ▲282.01 ▼0.0142.70 ▲5.5637.74 ▲3.29
Add New Post /wp-admin/post-new.php1,698 ▲15322.13 ▼1.01664.88 ▼16.0561.32 ▲8.55
Media Library /wp-admin/upload.php1,422 ▲224.21 ▼0.0898.32 ▼16.1748.54 ▼1.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/excalibur-paywall/public/partials/excalibur-pay-wall-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/excalibur-paywall/admin/partials/excalibur-pay-wall-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Example of an offer), #2 (Screenshot of Excalibur Lightbox), #3 (Screenshot of price listing to customers), #4 (Screenshot of the configuration module), #5 (Screenshot of the customer service module where you can look up customers and assist them.)
The official readme.txt is a good inspiration

excalibur-paywall/excalibur-pay-wall.php 85% from 13 tests

The main PHP file in "Excalibur Paywall" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("excalibur-paywall.php" instead of "excalibur-pay-wall.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin234 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12122530200
JavaScript345433
CSS30131

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.83MB with 0.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.PNG619.75KB139.90KB▼ 77.43%
screenshot-5.png29.16KB13.34KB▼ 54.25%
screenshot-1.png160.96KB45.55KB▼ 71.70%
screenshot-4.png18.49KB8.29KB▼ 55.14%
screenshot-3.png23.15KB11.94KB▼ 48.43%