48% atom-appointment-management

Code Review | ATOM Appointment Management

WordPress plugin ATOM Appointment Management scored48%from 54 tests.

About plugin

  • Plugin page: atom-appointment-...
  • Plugin version: 4.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2019
  • Latest release: Feb 3, 2023
  • Number of updates: 11
  • Update frequency: every 110.3 days
  • Top authors: atomproductions (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,124 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.12MB] [CPU: ▼41.02ms] Passed 4 tests

An overview of server-side resources used by ATOM Appointment Management
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.62 ▼0.848.77 ▼25.51
Dashboard /wp-admin2.97 ▼0.3313.75 ▼31.95
Posts /wp-admin/edit.php2.98 ▼0.3915.06 ▼32.98
Add New Post /wp-admin/post-new.php2.97 ▼2.9215.15 ▼73.65
Media Library /wp-admin/upload.php2.97 ▼0.2613.97 ▼20.27
E-Mails /wp-admin/admin.php?page=atom-appointment-management-email2.9814.00
Individual Appointments /wp-admin/admin.php?page=atom-appointment-management-individual2.9814.76
Settings /wp-admin/admin.php?page=atom-appointment-management-settings2.9813.49
Rule-Based Appointments /wp-admin/admin.php?page=atom-appointment-management-rule-based2.9820.73
Appointments /wp-admin/admin.php?page=atom-appointment-management2.9813.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2,058 new files
Database: 2 new tables, 7 new options
New tables
wp_aam_entries
wp_aam_exceptions
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
atom_aam_version
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for ATOM Appointment Management
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲22115.89 ▲1.6745.76 ▲44.0938.54 ▼2.32
Dashboard /wp-admin2,244 ▲524.85 ▼0.11113.32 ▼5.5244.27 ▲2.05
Posts /wp-admin/edit.php2,124 ▲351.97 ▼0.0735.06 ▼2.4132.42 ▼0.37
Add New Post /wp-admin/post-new.php1,561 ▲4223.33 ▼0.15654.38 ▼25.6252.12 ▼10.70
Media Library /wp-admin/upload.php1,426 ▲354.20 ▲0.0197.45 ▼4.0943.53 ▼0.78
E-Mails /wp-admin/admin.php?page=atom-appointment-management-email1,1882.1530.5134.77
Individual Appointments /wp-admin/admin.php?page=atom-appointment-management-individual1,1292.1331.1131.11
Settings /wp-admin/admin.php?page=atom-appointment-management-settings3,2057.50179.04134.79
Rule-Based Appointments /wp-admin/admin.php?page=atom-appointment-management-rule-based1,8162.3637.5734.21
Appointments /wp-admin/admin.php?page=atom-appointment-management9392.1428.3027.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/atom-appointment-management/classes/aam.class.php+331
    Trying to access array offset on value of type bool
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_aam_entries
    • wp_aam_exceptions
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • atom_aam_version
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=atom-appointment-management
    • > Notice in wp-content/plugins/atom-appointment-management/classes/aam.class.php+331
    Trying to access array offset on value of type bool

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
  • 984× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\Type' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/Type/PhoneNumberAttributedValueType.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\ArrayType' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/ArrayType/ArrayOfFindMessageTrackingSearchResultType.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\Type\\FolderChangeDescriptionType' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/Type/AppendToFolderFieldType.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\Type' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/Type/FindItemParentType.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\Type' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/Type/ServerVersionInfo.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/atom-appointment-management/vendor/symfony/translation/Loader/CsvFileLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\ArrayType' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/ArrayType/ArrayOfWorkingPeriod.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\Request\\BaseRequestType' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/Request/GetAttachmentType.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\Response\\BaseResponseMessageType' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/Response/CreateFolderPathResponseType.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'jamesiarmes\\PhpEws\\ArrayType' not found in wp-content/plugins/atom-appointment-management/vendor/php-ews/php-ews/src/ArrayType/ArrayOfTransitionsGroupsType.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: event, kalender, business, kunde, calendar...

atom-appointment-management/atom-appointment-management.php Passed 13 tests

Analyzing the main PHP file in "ATOM Appointment Management" version 4.1.1
54 characters long description:
Easily manage and schedule your customer appointments.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/atom-appointment-management/vendor/nesbot/carbon/bin/carbon.bat
83,557 lines of code in 1,782 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,70415,09564,50457,560
XSD51,54360815,094
XML12641123,248
PO File268721,0592,854
JSON13801,301
JavaScript419671981
Sass32106858
Markdown152790822
CSS75059789
Mustache12027
YAML20019
DOS Batch1004

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.01
▷ Minimum class complexity1.00
▷ Maximum class complexity315.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces35
Interfaces28
Traits26
Classes956
▷ Abstract classes505.23%
▷ Concrete classes90694.77%
▷ Final classes141.55%
Methods2,527
▷ Static methods42716.90%
▷ Public methods2,09082.71%
▷ Protected methods30512.07%
▷ Private methods1325.22%
Functions332
▷ Named functions10030.12%
▷ Anonymous functions23269.88%
Constants1,671
▷ Global constants140.84%
▷ Class constants1,65799.16%
▷ Public constants1,65499.82%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
vendor/php-ews/php-ews/examples/assets/exchange.png6.31KB3.11KB▼ 50.72%