83% members-only-posts

Code Review | Members Only Posts

WordPress plugin Members Only Posts scored83%from 54 tests.

About plugin

  • Plugin page: members-only-posts
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Jul 10, 2020
  • Latest release: Aug 1, 2020
  • Number of updates: 6
  • Update frequency: every 3.7 days
  • Top authors: davidfcarr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /579 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼9.26ms] Passed 4 tests

This is a short check of server-side resources used by Members Only Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.94 ▼0.37
Dashboard /wp-admin3.40 ▲0.0647.35 ▼18.62
Posts /wp-admin/edit.php3.46 ▲0.1050.49 ▲0.31
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.03 ▼18.34
Media Library /wp-admin/upload.php3.33 ▲0.1039.50 ▲2.32

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 9 new options
New WordPress options
widget_club-news-posts
widget_members-posts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
category_children
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Members Only Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.39 ▼0.251.79 ▼0.2345.37 ▲4.52
Dashboard /wp-admin2,195 ▲155.65 ▲0.0990.96 ▼12.1338.79 ▼7.39
Posts /wp-admin/edit.php2,118 ▲182.00 ▲0.0040.74 ▲3.2036.96 ▲1.47
Add New Post /wp-admin/post-new.php1,545 ▲1023.25 ▼0.06671.96 ▲10.3456.87 ▲3.14
Media Library /wp-admin/upload.php1,394 ▼64.30 ▲0.0998.52 ▼4.8545.06 ▼1.81

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_club-news-posts
    • can_compress_scripts
    • widget_members-posts
    • category_children
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members-only-posts/members-only-widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members-only-posts/members-only-widgets.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: members only

members-only-posts/members-only.php 77% from 13 tests

The entry point to "Members Only Posts" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 267 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("members-only-posts.php" instead of "members-only.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected354 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27216354

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity20.50
▷ Minimum class complexity20.00
▷ Maximum class complexity21.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin