78% cmobile-christmas-calendar

Code Review | Christmas Calendar by CMobile

WordPress plugin Christmas Calendar by CMobile scored 78% from 54 tests.

About plugin

  • Plugin page: cmobile-christmas...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Dec 1, 2017
  • Latest release: Dec 4, 2018
  • Number of updates: 9
  • Update frequency: every 41.0 days
  • Top authors: cmobile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,147 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.14MB] [CPU: ▼3.20ms] Passed 4 tests

An overview of server-side resources used by Christmas Calendar by CMobile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1156.47 ▲19.29
Dashboard /wp-admin3.45 ▲0.1552.01 ▲0.83
Posts /wp-admin/edit.php3.57 ▲0.2149.42 ▲0.59
Add New Post /wp-admin/post-new.php6.03 ▲0.1585.83 ▼14.69
Media Library /wp-admin/upload.php3.37 ▲0.1535.54 ▲0.46
Christmas Calendar /wp-admin/options-general.php?page=my-setting-admin3.3432.21
Books /wp-admin/edit.php?post_type=book3.4234.49
Add New /wp-admin/post-new.php?post_type=book3.4948.93

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Christmas Calendar by CMobile
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.27 ▼1.112.53 ▲0.8354.95 ▲16.71
Dashboard /wp-admin2,240 ▲525.87 ▼0.03112.40 ▲1.5343.34 ▼1.94
Posts /wp-admin/edit.php2,120 ▲312.01 ▼0.1537.52 ▼3.0332.45 ▼4.57
Add New Post /wp-admin/post-new.php1,568 ▲3918.73 ▲0.39609.98 ▼11.3759.48 ▼1.55
Media Library /wp-admin/upload.php1,422 ▲344.24 ▲0.01102.51 ▼3.2944.12 ▲0.13
Christmas Calendar /wp-admin/options-general.php?page=my-setting-admin1,0811.7327.7629.67
Books /wp-admin/edit.php?post_type=book1,0841.9833.3029.52
Add New /wp-admin/post-new.php?post_type=book2,1737.56175.3862.35

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cmobile-christmas-calendar/cmobile-christmascalendar.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cmobile-christmas-calendar/admin/cmobile-options.php:551

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

cmobile-christmas-calendar/cmobile-christmascalendar.php 85% from 13 tests

The main PHP file in "Christmas Calendar by CMobile" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cmobile-christmas-calendar.php" instead of "cmobile-christmascalendar.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin885 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4103106451
JavaScript14241200
CSS11611186
PO File1161648

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity32.50
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
26 compressed PNG files occupy 0.50MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Lucka11.png15.38KB16.12KB0.00%
images/Lucka4.png12.08KB12.91KB0.00%
images/baksida_lucka.png36.16KB38.67KB0.00%
images/Lucka12.png24.73KB25.54KB0.00%
images/Lucka1.png5.72KB6.13KB0.00%