90% exclusive-content-shortcode

Code Review | Exclusive Content Shortcode

WordPress plugin Exclusive Content Shortcode scored90%from 54 tests.

About plugin

  • Plugin page: exclusive-content...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2018
  • Latest release: Jan 21, 2020
  • Number of updates: 3
  • Update frequency: every 181.7 days
  • Top authors: wpza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.45ms] Passed 4 tests

An overview of server-side resources used by Exclusive Content Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.56 ▼2.05
Dashboard /wp-admin3.32 ▲0.0248.89 ▼6.73
Posts /wp-admin/edit.php3.38 ▲0.0250.87 ▼2.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.68 ▼18.10
Media Library /wp-admin/upload.php3.25 ▲0.0240.26 ▲4.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Exclusive Content Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.27 ▼0.391.84 ▲0.0241.16 ▼1.85
Dashboard /wp-admin2,237 ▲605.52 ▼0.0688.15 ▼12.6341.56 ▼1.05
Posts /wp-admin/edit.php2,141 ▲412.04 ▲0.0436.44 ▲0.1538.26 ▼0.95
Add New Post /wp-admin/post-new.php1,539 ▲1322.83 ▼0.09673.88 ▲23.9060.24 ▲8.42
Media Library /wp-admin/upload.php1,441 ▲414.29 ▲0.14110.98 ▼2.2046.20 ▼3.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: exclusive content, logged in content, logged in only, hide content

exclusive-content-shortcode/wpza_ec.php 92% from 13 tests

The main PHP script in "Exclusive Content Shortcode" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("exclusive-content-shortcode.php" instead of "wpza_ec.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin93 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP483593

PHP code Passed 2 tests

An short overview of 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.48
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods00.00%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected