83% wpm-simple-calendar

Code Review | WPM Simple Calendar

WordPress plugin WPM Simple Calendar scored 83% from 54 tests.

About plugin

  • Plugin page: wpm-simple-calendar
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Jan 23, 2018
  • Latest release: Jan 23, 2018
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: ariful233 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 530 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.47ms] Passed 4 tests

Server-side resources used by WPM Simple Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.43 ▼5.53
Dashboard /wp-admin3.32 ▲0.0144.91 ▼3.68
Posts /wp-admin/edit.php3.37 ▲0.0146.21 ▲0.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.54 ▼0.97
Media Library /wp-admin/upload.php3.24 ▲0.0143.50 ▲9.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WPM Simple Calendar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20814.64 ▲0.2410.07 ▲7.9124.97 ▼20.21
Dashboard /wp-admin2,221 ▲305.08 ▲0.1899.98 ▼26.7648.55 ▲3.57
Posts /wp-admin/edit.php2,098 ▲92.28 ▲0.2534.02 ▼0.6237.18 ▲3.46
Add New Post /wp-admin/post-new.php1,679 ▲30622.50 ▲4.89693.05 ▼103.3254.86 ▼2.91
Media Library /wp-admin/upload.php1,403 ▲154.36 ▲0.1896.30 ▼6.7361.75 ▲15.62

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× 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/wpm-simple-calendar/main-function.php:21

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 on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

wpm-simple-calendar/main-function.php 77% from 13 tests

"WPM Simple Calendar" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpm-simple-calendar.php" instead of "main-function.php")
  • 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

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
Good job! No executable or dangerous file extensions detected1,235 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript30311,105
CSS422186
PHP1441744

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png0.36KB0.27KB▼ 25.54%