84% unlisted-posts

Code Review | Unlisted Posts

WordPress plugin Unlisted Posts scored84%from 54 tests.

About plugin

  • Plugin page: unlisted-posts
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: Jul 11, 2022
  • Number of updates: 4
  • Update frequency: every 151.7 days
  • Top authors: someguy9 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /721 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Unlisted Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.01 ▼7.38
Dashboard /wp-admin3.31 ▲0.0143.47 ▼5.02
Posts /wp-admin/edit.php3.36 ▲0.0148.91 ▲0.62
Add New Post /wp-admin/post-new.php5.89 ▲0.01118.55 ▲25.36
Media Library /wp-admin/upload.php3.23 ▲0.0030.55 ▼2.11

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Unlisted Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼0.774.31 ▲2.2741.15 ▼4.44
Dashboard /wp-admin2,206 ▲184.85 ▼0.04108.29 ▼7.5941.38 ▼2.34
Posts /wp-admin/edit.php2,092 ▼02.12 ▲0.1144.23 ▲7.3736.42 ▲2.23
Add New Post /wp-admin/post-new.php6,294 ▲4,76119.34 ▼3.92926.60 ▲263.8956.21 ▲4.04
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0395.06 ▼7.7142.13 ▼1.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unlisted-posts/unlisted-posts.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: visibility, hide posts, exclude

unlisted-posts/unlisted-posts.php 92% from 13 tests

The principal PHP file in "Unlisted Posts" v. 1.1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
There were no executable files found in this plugin68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1161168

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions5
▷ Named functions5100.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 are no PNG files in this plugin