77% nic-app-crono

Code Review | Nic-app Crono

WordPress plugin Nic-app Crono scored 77% from 54 tests.

About plugin

  • Plugin page: nic-app-crono
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 11, 2020
  • Latest release: Sep 28, 2020
  • Number of updates: 84
  • Update frequency: every 0.2 days
  • Top authors: efraimbayarri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 391 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.60ms] Passed 4 tests

Analyzing server-side resources used by Nic-app Crono
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.24 ▼2.28
Dashboard /wp-admin3.37 ▲0.0745.88 ▼1.59
Posts /wp-admin/edit.php3.48 ▲0.1350.34 ▼13.03
Add New Post /wp-admin/post-new.php5.97 ▲0.0987.52 ▼14.68
Media Library /wp-admin/upload.php3.29 ▲0.0737.48 ▼8.39
Nic-app Crono /wp-admin/admin.php?page=nicappcrono3.3031.81
Calendars /wp-admin/edit.php?post_type=nicappcronocalendars3.3436.70
Support /wp-admin/admin.php?page=nicappcrono-support3.2932.11
Settings /wp-admin/admin.php?page=nicappcrono-settings3.2933.46
Scheduling /wp-admin/admin.php?page=nicappcrono-scheduling3.2932.28

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Nic-app Crono
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18913.57 ▼0.827.68 ▲5.3441.13 ▼8.25
Dashboard /wp-admin2,247 ▲594.88 ▼1.0396.52 ▼6.2479.76 ▲38.99
Posts /wp-admin/edit.php2,133 ▲412.01 ▼0.0438.28 ▼2.1137.18 ▲2.12
Add New Post /wp-admin/post-new.php1,560 ▲2318.13 ▼0.32675.44 ▲46.0855.61 ▲5.94
Media Library /wp-admin/upload.php1,426 ▲384.13 ▼0.09103.69 ▲0.5446.38 ▲5.37
Nic-app Crono /wp-admin/admin.php?page=nicappcrono8472.0524.3827.76
Calendars /wp-admin/edit.php?post_type=nicappcronocalendars1,1171.9432.6330.48
Support /wp-admin/admin.php?page=nicappcrono-support8222.0524.6326.05
Settings /wp-admin/admin.php?page=nicappcrono-settings8842.2126.4326.63
Scheduling /wp-admin/admin.php?page=nicappcrono-scheduling8332.0624.9425.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/nic-app-crono/public/partials/nicappcrono-public-display.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/nic-app-crono/admin/partials/nicappcrono-admin-support-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/nic-app-crono/admin/partials/nicappcrono-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/nic-app-crono/admin/partials/nicappcrono-admin-settings-display.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Cronofy\\Http\\HttpRequest' not found in wp-content/plugins/nic-app-crono/Cronofy/Http/CurlRequest.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/nic-app-crono/admin/partials/nicappcrono-admin-scheduling-display.php:17

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, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === nic-app-crono === )
The official readme.txt is a good inspiration

nic-app-crono/nicappcrono.php 77% from 13 tests

The primary PHP file in "Nic-app Crono" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nic-app-crono.php" instead of "nicappcrono.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,341 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP203031,2982,092
PO File17795235
CSS2088
JavaScript24546

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.25
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods129
▷ Static methods21.55%
▷ Public methods9472.87%
▷ Protected methods10.78%
▷ Private methods3426.36%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/NIC-APP-03-350x233.png42.81KB16.49KB▼ 61.48%
admin/img/nic-app-logo.png7.16KB0.88KB▼ 87.78%