68% what-the-cron

Code Review | What The Cron

WordPress plugin What The Cron scored68%from 54 tests.

About plugin

  • Plugin page: what-the-cron
  • Plugin version: 0.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3
  • WordPress version: 6.3.1
  • First release: Dec 8, 2019
  • Latest release: Dec 13, 2019
  • Number of updates: 14
  • Update frequency: every 6.7 days
  • Top authors: gilbitron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /702 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.19MB] [CPU: ▼2.88ms] Passed 4 tests

A check of server-side resources used by What The Cron
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1842.96 ▼3.33
Dashboard /wp-admin3.54 ▲0.2453.34 ▼1.92
Posts /wp-admin/edit.php3.60 ▲0.2354.68 ▲1.30
Add New Post /wp-admin/post-new.php6.06 ▲0.1799.21 ▼7.56
Media Library /wp-admin/upload.php3.40 ▲0.1743.47 ▲5.00
What The Cron /wp-admin/tools.php?page=what-the-cron5.7847.77

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 977 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for What The Cron
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.101.60 ▼0.3941.32 ▼3.20
Dashboard /wp-admin2,199 ▲195.62 ▼0.0490.55 ▼1.9743.34 ▲2.81
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.1035.88 ▼1.6936.68 ▼1.43
Add New Post /wp-admin/post-new.php1,529 ▲323.28 ▲0.16614.13 ▼80.8552.83 ▼21.58
Media Library /wp-admin/upload.php1,398 ▼24.11 ▼0.03102.04 ▼12.1141.75 ▼11.22
What The Cron /wp-admin/tools.php?page=what-the-cron1,1022.1724.8233.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/what-the-cron/vendor/symfony/translation/Resources/bin/translation-status.php
  • 66× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' not found in wp-content/plugins/what-the-cron/vendor/symfony/translation/Loader/FileLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\ServiceProvider' not found in wp-content/plugins/what-the-cron/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' not found in wp-content/plugins/what-the-cron/vendor/symfony/translation/Exception/InvalidResourceException.php:19
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\Mixin' not found in wp-content/plugins/what-the-cron/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php on line 31
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/what-the-cron/vendor/symfony/translation/IdentityTranslator.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/what-the-cron/vendor/symfony/translation/Command/XliffLintCommand.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' not found in wp-content/plugins/what-the-cron/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php:23
    • > PHP Warning
      Class 'Symfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/what-the-cron/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php on line 24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' not found in wp-content/plugins/what-the-cron/vendor/symfony/translation/Extractor/ChainExtractor.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' not found in wp-content/plugins/what-the-cron/vendor/symfony/translation/Extractor/PhpExtractor.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: cron, admin, plugin, wp-cron

what-the-cron/what-the-cron.php Passed 13 tests

"What The Cron" version 0.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
30 characters long description:
What is the deal with my cron?

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
It is important to fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/what-the-cron/vendor/nesbot/carbon/bin/carbon.bat
33,943 lines of code in 769 files:
LanguageFilesBlank linesComment linesLines of code
PHP7485,41122,45630,054
XSD392482,803
JSON700638
Markdown71470392
XML10044
YAML2018
DOS Batch1004

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 139)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity20.34
▷ Minimum class complexity1.00
▷ Maximum class complexity296.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity139.00
Code structure
Namespaces23
Interfaces15
Traits20
Classes74
▷ Abstract classes45.41%
▷ Concrete classes7094.59%
▷ Final classes11.43%
Methods1,313
▷ Static methods30223.00%
▷ Public methods1,15187.66%
▷ Protected methods947.16%
▷ Private methods685.18%
Functions254
▷ Named functions5120.08%
▷ Anonymous functions20379.92%
Constants73
▷ Global constants34.11%
▷ Class constants7095.89%
▷ Public constants70100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin