83% wordpress-plugin-ajax-calendar-with-future-posts

Code Review | AJAX Calendar Future POSTS

WordPress plugin AJAX Calendar Future POSTS scored83%from 54 tests.

About plugin

  • Plugin page: wordpress-plugin-...
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.2.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2011
  • Latest release: Aug 27, 2019
  • Number of updates: 40
  • Update frequency: every 77.1 days
  • Top authors: erwanpia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /8,003 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 gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.36ms] Passed 4 tests

A check of server-side resources used by AJAX Calendar Future POSTS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.69 ▲0.53
Dashboard /wp-admin3.37 ▲0.0748.06 ▼0.86
Posts /wp-admin/edit.php3.49 ▲0.1348.96 ▼1.20
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.13 ▲0.08
Media Library /wp-admin/upload.php3.30 ▲0.0741.42 ▲5.44

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_ajax_calendar_future_widget
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by AJAX Calendar Future POSTS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.69 ▼0.627.60 ▲5.9342.37 ▼4.44
Dashboard /wp-admin2,206 ▲204.84 ▼0.15119.40 ▲8.4741.31 ▼1.64
Posts /wp-admin/edit.php2,092 ▲62.04 ▲0.0339.06 ▲1.1937.95 ▲4.29
Add New Post /wp-admin/post-new.php1,514 ▼1923.36 ▲0.07628.63 ▼32.9150.46 ▲3.11
Media Library /wp-admin/upload.php1,385 ▼64.25 ▲0.0898.94 ▼2.5144.56 ▲1.38

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_ajax_calendar_future_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/jss.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/old/ajax-calendar-future_101.php:10
    • > PHP Fatal error
      'break' not in the 'loop' or 'switch' context in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/include/admin-page-framework/classes/admin-page-framework.php on line 2338
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/old/ajax-calendar-future_old.php:11
    • > PHP Fatal error
      'break' not in the 'loop' or 'switch' context in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/include/admin-page-framework/classes/admin-page-framework.php on line 2338
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/old/ajax-calendar-future_jq-try.php:11
    • > PHP Fatal error
      'break' not in the 'loop' or 'switch' context in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/include/admin-page-framework/classes/admin-page-framework.php on line 2338
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/ajax-calendar-future.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/include/widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wordpress-plugin-ajax-calendar-with-future-posts/include/query.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Example screenshot) image missing
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wordpress-plugin-ajax-calendar-with-future-posts === )
The official readme.txt might help

wordpress-plugin-ajax-calendar-with-future-posts/ajax-calendar-future.php 85% from 13 tests

Analyzing the main PHP file in "AJAX Calendar Future POSTS" version 1.3.5
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 322 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordpress-plugin-ajax-calendar-with-future-posts.php" instead of "ajax-calendar-future.php")

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
There were no executable files found in this plugin3,175 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP111,0168833,148
CSS11014
JavaScript18113

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity33.78
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods170
▷ Static methods00.00%
▷ Public methods11768.82%
▷ Protected methods5331.18%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) images/._arrow_left-sq.png4.00KB0.00KB▼ 100.00%
include/admin-page-framework/img/demo_02_32x32.png0.62KB0.74KB0.00%
images/arrow_left-sq.png1.39KB0.59KB▼ 57.38%
include/admin-page-framework/img/demo_01_32x32.png1.76KB1.09KB▼ 38.17%
include/admin-page-framework/img/demo_03_32x32.png0.72KB0.86KB0.00%