77% the-future-posts

Code Review | The Future Posts

WordPress plugin The Future Posts scored77%from 54 tests.

About plugin

  • Plugin page: the-future-posts
  • Plugin version: 1.40
  • PHP compatiblity: 5.4.45+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 12, 2018
  • Latest release: Aug 7, 2018
  • Number of updates: 52
  • Update frequency: every 1.1 days
  • Top authors: jdalmeida (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,953 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: ▼0.32ms] Passed 4 tests

Server-side resources used by The Future Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.16 ▲3.97
Dashboard /wp-admin3.32 ▲0.0248.97 ▼1.69
Posts /wp-admin/edit.php3.37 ▲0.0148.64 ▼3.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.27 ▲4.56
Media Library /wp-admin/upload.php3.24 ▲0.0136.01 ▼0.54
Quick Start /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_quick_start.php3.2829.16
Shortcode Attributes /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_shortcode_attributes.php3.2532.00
Overlay Icons /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_overlay_icons.php3.3229.27
Themes /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_themes.php3.2534.44
About /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_about.php3.2430.80
FAQ /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_faq.php3.2333.27
What's New? /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_whats_new.php3.2331.51

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

The Future Posts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18413.58 ▼1.078.40 ▲6.4941.78 ▼1.42
Dashboard /wp-admin2,249 ▲615.81 ▼0.0494.85 ▼10.3840.61 ▼1.18
Posts /wp-admin/edit.php2,132 ▲402.04 ▼0.0239.66 ▲0.1535.52 ▼0.79
Add New Post /wp-admin/post-new.php1,567 ▲3423.25 ▲0.20604.33 ▼33.2754.37 ▼9.19
Media Library /wp-admin/upload.php1,431 ▲434.20 ▼0.0293.19 ▼12.2942.78 ▲0.74
Quick Start /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_quick_start.php1,5872.2032.6355.48
Shortcode Attributes /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_shortcode_attributes.php1,5292.3732.4440.34
Overlay Icons /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_overlay_icons.php2,5512.2230.8449.19
Themes /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_themes.php1,2732.2027.2440.85
About /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_about.php1,2502.2127.5035.50
FAQ /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_faq.php1,2412.2031.7836.85
What's New? /wp-admin/admin.php?page=the-future-posts/includes/submenu_item_whats_new.php1,3682.2227.8534.35

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 9× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/the-future-posts/includes/submenu_item_whats_new.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_item_faq.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_item_themes.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_footer.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_item_quick_start.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_header.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_item_shortcode_attributes.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_item_about.php
    • > /wp-content/plugins/the-future-posts/includes/submenu_item_overlay_icons.php
  • 77× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include(THE_FUTURE_POSTS_DIRincludes/submenu_header.php): failed to open stream: No such file or directory in wp-content/plugins/the-future-posts/includes/submenu_item_themes.php on line 7
    • > PHP Warning
      include(THE_FUTURE_POSTS_DIRincludes/submenu_header.php): failed to open stream: No such file or directory in wp-content/plugins/the-future-posts/includes/submenu_item_faq.php on line 7
    • > PHP Warning
      Use of undefined constant THE_FUTURE_POSTS_DIR - assumed 'THE_FUTURE_POSTS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/the-future-posts/includes/submenu_item_quick_start.php on line 7
    • > PHP Warning
      include(THE_FUTURE_POSTS_DIRincludes/submenu_header.php): failed to open stream: No such file or directory in wp-content/plugins/the-future-posts/includes/submenu_item_shortcode_attributes.php on line 7
    • > PHP Warning
      include(THE_FUTURE_POSTS_DIRincludes/submenu_footer.php): failed to open stream: No such file or directory in wp-content/plugins/the-future-posts/includes/submenu_item_quick_start.php on line 511
    • > PHP Warning
      Use of undefined constant THE_FUTURE_POSTS_DIR - assumed 'THE_FUTURE_POSTS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/the-future-posts/includes/submenu_item_faq.php on line 20
    • > PHP Warning
      Use of undefined constant THE_FUTURE_POSTS_DIR - assumed 'THE_FUTURE_POSTS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/the-future-posts/includes/submenu_item_themes.php on line 7
    • > PHP Warning
      Use of undefined constant THE_FUTURE_POSTS_URL - assumed 'THE_FUTURE_POSTS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/the-future-posts/includes/submenu_item_quick_start.php on line 71
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/the-future-posts/includes/submenu_item_overlay_icons.php on line 119
    • > PHP Warning
      include(THE_FUTURE_POSTS_DIRincludes/submenu_header.php): failed to open stream: No such file or directory in wp-content/plugins/the-future-posts/includes/submenu_item_overlay_icons.php on line 7

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: post grid, elementor, scheduled, beaver builder, responsive...

the-future-posts/the-future-posts.php 77% from 13 tests

"The Future Posts" version 1.40's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • 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
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)
  • Requires PHP: Required version must match the one declared in readme.txt ("5.6.0" instead of "5.4.45")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected3,999 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS7303842,058
PHP125681271,359
SVG41490435
HTML152082
JavaScript3122465

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 5.87MB with 3.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-8.png359.18KB174.55KB▼ 51.40%
images/screenshot-6.png701.41KB266.63KB▼ 61.99%
images/screenshot-2.png705.10KB356.42KB▼ 49.45%
images/screenshot-10.png602.82KB269.66KB▼ 55.27%
images/screenshot-4.png549.67KB219.61KB▼ 60.05%