84% kings-different-content-for-members

Code Review | Kings Different Content for Members

WordPress plugin Kings Different Content for Members scored84%from 54 tests.

About plugin

  • Plugin page: kings-different-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: May 29, 2014
  • Latest release: Jun 9, 2014
  • Number of updates: 6
  • Update frequency: every 1.8 days
  • Top authors: KingsRRF (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,218 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Kings Different Content for Members
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.52 ▼2.36
Dashboard /wp-admin3.31 ▼0.0443.44 ▼14.16
Posts /wp-admin/edit.php3.36 ▲0.0043.94 ▲1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.42 ▼21.82
Media Library /wp-admin/upload.php3.23 ▲0.0034.72 ▲1.07

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Kings Different Content for Members
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.25 ▼0.321.65 ▲0.0638.89 ▼2.80
Dashboard /wp-admin2,198 ▲205.50 ▼0.1885.62 ▼13.0537.09 ▼4.07
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0833.10 ▼0.4235.04 ▲1.71
Add New Post /wp-admin/post-new.php1,526 ▼523.42 ▲0.45658.51 ▼11.6863.92 ▲13.57
Media Library /wp-admin/upload.php1,400 ▼04.29 ▲0.12102.64 ▼2.4445.78 ▼1.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 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 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/kings-different-content-for-members/plugin-hook.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: members only content, restricted contents, logged in user contents, logged in content, logged in only content...

kings-different-content-for-members/plugin-hook.php 92% from 13 tests

This is the main PHP file of "Kings Different Content for Members" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("kings-different-content-for-members.php" instead of "plugin-hook.php")

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 plugin28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11828

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin