84% dots-paywall

Code Review | Dots Paywall

WordPress plugin Dots Paywall scored84%from 54 tests.

About plugin

  • Plugin page: dots-paywall
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2021
  • Latest release: Jul 2, 2021
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: kartikye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /309 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.03MB] [CPU: ▼5.99ms] Passed 4 tests

An overview of server-side resources used by Dots Paywall
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.47 ▼8.82
Dashboard /wp-admin3.34 ▲0.0351.79 ▲1.84
Posts /wp-admin/edit.php3.39 ▲0.0349.27 ▼3.90
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.78 ▼11.53
Media Library /wp-admin/upload.php3.26 ▲0.0341.03 ▲0.28
Dots Paywall /wp-admin/options-general.php?page=dotsPaywall3.2232.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
lightbox_showpaywalltext
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
dots_username
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Dots Paywall
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3314.29 ▼0.452.13 ▲0.0942.88 ▼5.33
Dashboard /wp-admin2,228 ▲255.83 ▼0.02101.46 ▼9.9137.72 ▼2.26
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0139.07 ▼0.0837.52 ▲2.73
Add New Post /wp-admin/post-new.php1,548 ▲1723.26 ▲0.21645.98 ▲1.1460.02 ▼6.28
Media Library /wp-admin/upload.php1,407 ▲44.23 ▼0.00110.53 ▲0.4148.23 ▼1.91
Dots Paywall /wp-admin/options-general.php?page=dotsPaywall8002.0223.3426.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • dots_username
    • widget_theysaidso_widget
    • lightbox_showpaywalltext
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dots-paywall/dotsPaywall.php:79

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: monetization, paywall

dots-paywall/dotsPaywall.php 92% from 13 tests

Analyzing the main PHP file in "Dots Paywall" version 1.0.0
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dots-paywall.php" instead of "dotsPaywall.php")

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
Everything looks great! No dangerous files found in this plugin137 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13216136
JavaScript1011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin