77% lemontec-fancy-xmas-calendar

Code Review | LEMONTEC fancy XMAS-Calendar

WordPress plugin LEMONTEC fancy XMAS-Calendar scored77%from 54 tests.

About plugin

  • Plugin page: lemontec-fancy-xm...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4-6.0.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2022
  • Latest release: Nov 26, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: Lemontec (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /166 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
Installer ran successfully

Server metrics [RAM: ▲3.80MB] [CPU: ▲25.62ms] Passed 4 tests

Server-side resources used by LEMONTEC fancy XMAS-Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.06 ▲3.5674.88 ▲25.73
Dashboard /wp-admin7.19 ▲3.8185.78 ▲17.21
Posts /wp-admin/edit.php7.29 ▲3.8978.56 ▲30.27
Add New Post /wp-admin/post-new.php10.05 ▲4.12129.80 ▲29.26
Media Library /wp-admin/upload.php7.20 ▲3.9380.41 ▲38.53
Field Groups /wp-admin/edit.php?post_type=acf-field-group7.1770.70
Add New /wp-admin/post-new.php?post_type=acf-field-group7.3381.62
All Items /wp-admin/edit.php?post_type=xmas-calendar7.3079.47
Add New /wp-admin/post-new.php?post_type=xmas-calendar7.3776.60
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools7.1966.92
Calendar Settings /wp-admin/edit.php?post_type=xmas-calendar&page=wordpress_fancy_xmas-calendar7.0663.08

Server storage [IO: ▲12.75MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 410 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
lmt_xmas_calendar_settings
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
acf_version

Browser metrics Passed 4 tests

An overview of browser requirements for LEMONTEC fancy XMAS-Calendar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲8214.35 ▲0.001.72 ▼0.4544.37 ▲2.17
Dashboard /wp-admin2,259 ▲825.64 ▼0.0293.21 ▼6.4743.15 ▲1.12
Posts /wp-admin/edit.php2,161 ▲611.97 ▼0.0538.18 ▲0.2836.34 ▼3.77
Add New Post /wp-admin/post-new.php6,720 ▲5,19428.80 ▲5.731,111.41 ▲389.6142.94 ▼12.68
Media Library /wp-admin/upload.php2,016 ▲6198.23 ▲4.07215.41 ▲116.6253.98 ▲8.95
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,3642.4234.3936.56
Add New /wp-admin/post-new.php?post_type=acf-field-group4,1284.83124.75101.10
All Items /wp-admin/edit.php?post_type=xmas-calendar3,5171.9933.5937.94
Add New /wp-admin/post-new.php?post_type=xmas-calendar2,58710.18216.5762.71
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools1,2692.9546.3458.08
Calendar Settings /wp-admin/edit.php?post_type=xmas-calendar&page=wordpress_fancy_xmas-calendar1,1372.1323.3734.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • acf_version
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • lmt_xmas_calendar_settings
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=xmas-calendar&page=wordpress_fancy_xmas-calendar
    • > Notice in wp-content/plugins/lemontec-fancy-xmas-calendar/inc/inc-backend.php+120
    Undefined index: lmt_xmas_calendar_text_field_0
    • > GET request to /wp-admin/edit.php?post_type=xmas-calendar&page=wordpress_fancy_xmas-calendar
    • > Notice in wp-content/plugins/lemontec-fancy-xmas-calendar/inc/inc-backend.php+169
    Undefined index: lmt_xmas_calendar_text_field_8
    • > GET request to /wp-admin/edit.php?post_type=xmas-calendar&page=wordpress_fancy_xmas-calendar
    • > Notice in wp-content/plugins/lemontec-fancy-xmas-calendar/inc/inc-backend.php+180
    Undefined index: lmt_xmas_calendar_text_field_9
    • > GET request to /wp-admin/edit.php?post_type=xmas-calendar&page=wordpress_fancy_xmas-calendar
    • > Notice in wp-content/plugins/lemontec-fancy-xmas-calendar/inc/inc-backend.php+189
    Undefined index: lmt_xmas_calendar_text_field_10

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
Please fix the following items
  • 84× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/fields/class-acf-field-file.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_add_filter_variations() in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/rest-api/acf-rest-api-functions.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/fields/class-acf-field-number.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/acf-helper-functions.php:142
    • > PHP Notice
      Undefined variable: active in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/admin/views/html-admin-tools.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/admin/views/html-admin-page-upgrade-network.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/acf-input-functions.php:103
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_render_field_wrap() in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/admin/views/field-group-options.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/forms/form-comment.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/lemontec-fancy-xmas-calendar/acf/includes/fields/class-acf-field-checkbox.php:5

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)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Requires php: Version not formatted correctly
The official readme.txt might help

lemontec-fancy-xmas-calendar/lmt-xmas-calendar.php 77% from 13 tests

The main PHP script in "LEMONTEC fancy XMAS-Calendar" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("lemontec-fancy-xmas-calendar.php" instead of "lmt-xmas-calendar.php")
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected144,725 lines of code in 336 files:
LanguageFilesBlank linesComment linesLines of code
PO File4435,40860,55271,911
JavaScript165,2707,35238,699
PHP1468,50218,37420,107
CSS178421,48311,250
SVG112232,744
Markdown111014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.21
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes102
▷ Abstract classes21.96%
▷ Concrete classes10098.04%
▷ Final classes00.00%
Methods784
▷ Static methods10.13%
▷ Public methods76697.70%
▷ Protected methods00.00%
▷ Private methods182.30%
Functions467
▷ Named functions46499.36%
▷ Anonymous functions30.64%
Constants13
▷ Global constants13100.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
11 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/corner.png20.31KB7.52KB▼ 62.96%
acf/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%
assets/img/headline_logo.png21.74KB13.40KB▼ 38.36%
acf/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png0.08KB0.08KB0.00%
assets/img/footer-mobile.png3.77KB3.76KB0.13%