90% gtuk-unpublish-posts

Code Review | Gtuk unpublish posts

WordPress plugin Gtuk unpublish posts scored90%from 54 tests.

About plugin

  • Plugin page: gtuk-unpublish-posts
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 24, 2016
  • Latest release: Oct 23, 2018
  • Number of updates: 5
  • Update frequency: every 165.0 days
  • Top authors: gtuk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,007 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.28ms] Passed 4 tests

Server-side resources used by Gtuk unpublish posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.68 ▼3.65
Dashboard /wp-admin3.35 ▲0.0449.79 ▼5.50
Posts /wp-admin/edit.php3.40 ▲0.0453.49 ▲2.86
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.69 ▼6.19
Media Library /wp-admin/upload.php3.27 ▲0.0436.64 ▼1.76

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

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

Browser metrics Passed 4 tests

Gtuk unpublish posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.36 ▼0.171.78 ▼0.2047.38 ▼2.21
Dashboard /wp-admin2,202 ▲285.60 ▼0.0790.89 ▼8.4841.49 ▼1.69
Posts /wp-admin/edit.php2,104 ▲12.04 ▼0.1339.28 ▲2.9035.75 ▲1.03
Add New Post /wp-admin/post-new.php1,530 ▲423.22 ▼0.33639.79 ▼42.8257.15 ▼6.68
Media Library /wp-admin/upload.php1,401 ▲14.21 ▼0.0799.45 ▼3.4845.04 ▲1.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: unpublish, update, unpublish post, posts, date...

gtuk-unpublish-posts/gtuk-unpublish-posts.php Passed 13 tests

The main PHP file in "Gtuk unpublish posts" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
69 characters long description:
A plugin to add an expire date to pages, posts and custom post types.

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
Good job! No executable or dangerous file extensions detected301 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP13167144
PO File24850130
JavaScript11012
Markdown1508
CSS1007

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin