84% oktopost-future-posts

Code Review | Oktopost Future Posts

WordPress plugin Oktopost Future Posts scored84%from 54 tests.

About plugin

  • Plugin page: oktopost-future-p...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 30, 2015
  • Latest release: Oct 20, 2021
  • Number of updates: 5
  • Update frequency: every 451.0 days
  • Top authors: oktopost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,041 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.62ms] Passed 4 tests

This is a short check of server-side resources used by Oktopost Future Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.72 ▲1.77
Dashboard /wp-admin3.31 ▲0.0046.23 ▼1.06
Posts /wp-admin/edit.php3.36 ▲0.0045.64 ▼2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.90 ▼6.64
Media Library /wp-admin/upload.php3.23 ▲0.0032.34 ▲0.06

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Oktopost Future Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.121.86 ▼0.1944.66 ▼2.70
Dashboard /wp-admin2,209 ▲215.91 ▲1.0395.08 ▼13.8840.66 ▼4.51
Posts /wp-admin/edit.php2,089 ▼02.09 ▲0.0636.27 ▼4.7032.93 ▼4.57
Add New Post /wp-admin/post-new.php1,542 ▼218.48 ▲0.02609.87 ▼36.0851.69 ▼2.62
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0192.93 ▼7.0041.53 ▼1.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 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
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_action() in wp-content/plugins/oktopost-future-posts/oktopost-future-posts.php:48

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 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: future, posts, social media, social media publishing

oktopost-future-posts/oktopost-future-posts.php Passed 13 tests

This is the main PHP file of "Oktopost Future Posts" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
37 characters long description:
Allow Oktopost to access future posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin31 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110731

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods125.00%
▷ Protected methods00.00%
▷ Private methods375.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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