84% min-calendar

Code Review | Min Calendar

WordPress plugin Min Calendar scored 84% from 54 tests.

About plugin

  • Plugin page: min-calendar
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.2-4.7.4
  • WordPress version: 6.3.1
  • First release: Jun 23, 2013
  • Latest release: May 20, 2017
  • Number of updates: 75
  • Update frequency: every 19.0 days
  • Top authors: s-hiroshi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,691 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.73ms] Passed 4 tests

This is a short check of server-side resources used by Min Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.42 ▼1.98
Dashboard /wp-admin3.34 ▲0.0453.38 ▲2.64
Posts /wp-admin/edit.php3.45 ▲0.1050.87 ▼2.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0399.43 ▲5.77
Media Library /wp-admin/upload.php3.26 ▲0.0337.14 ▼0.64
Appearance /wp-admin/admin.php?page=mincalenar-appearance3.2334.36
Edit /wp-admin/admin.php?page=mincalendar3.2536.06

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Min Calendar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.77 ▲0.371.73 ▼0.0843.29 ▼2.41
Dashboard /wp-admin2,236 ▲454.86 ▼0.05103.75 ▼3.2043.58 ▼2.08
Posts /wp-admin/edit.php2,116 ▲302.00 ▲0.0136.65 ▼3.3132.75 ▼3.79
Add New Post /wp-admin/post-new.php1,536 ▲317.64 ▼5.76611.16 ▼51.6151.03 ▼8.02
Media Library /wp-admin/upload.php1,415 ▲334.17 ▼0.0096.90 ▲0.6140.67 ▲0.38
Appearance /wp-admin/admin.php?page=mincalenar-appearance1,2752.0324.3428.87
Edit /wp-admin/admin.php?page=mincalendar1,0642.3227.5629.39

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • mincalendar
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/min-calendar/admin/class-mc-list-table.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/min-calendar/admin/class-mc-list-table.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/min-calendar/min-calendar.php:41
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/min-calendar/admin/class-mc-list-table.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (setting of appearance), #2 (create calendar shortcode), #3 (insert shortcode to post), #4 (display example), #5 (relate post to day)
Please take inspiration from this readme.txt

min-calendar/min-calendar.php Passed 13 tests

The principal PHP file in "Min Calendar" v. 1.6.1 is loaded by WordPress automatically on each request
20 characters long description:
Add minimum calendar

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 plugin2,016 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP181947941,653
CSS5498256
JavaScript43250107

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.88
▷ Minimum class complexity2.00
▷ Maximum class complexity39.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods77
▷ Static methods2228.57%
▷ Public methods6381.82%
▷ Protected methods00.00%
▷ Private methods1418.18%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1392.86%
▷ Class constants17.14%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.36MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/fade-butt.png0.77KB0.54KB▼ 29.68%
screenshot-4.png78.64KB6.27KB▼ 92.02%
screenshot-3.png93.12KB10.85KB▼ 88.35%
admin/images/menu-icon.png0.59KB0.37KB▼ 37.46%
screenshot-1.png103.00KB44.26KB▼ 57.03%