78% cartoon-url

Code Review | Cartoon Url

WordPress plugin Cartoon Url scored 78% from 54 tests.

About plugin

  • Plugin page: cartoon-url
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.2
  • WordPress version: 5.9.2
  • First release: Sep 19, 2019
  • Latest release: Sep 19, 2019
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: foxmoon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 327 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.99MB] [CPU: ▼281.32ms] Passed 4 tests

An overview of server-side resources used by Cartoon Url
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /7.90 ▲4.3874.78 ▲21.49
Dashboard /wp-admin7.91 ▲4.5157.56 ▲23.19
Posts /wp-admin/edit.php7.91 ▲4.2855.86 ▲14.50
Add New Post /wp-admin/post-new.php9.77 ▲2.80114.11 ▼1,176.54
Media Library /wp-admin/upload.php7.91 ▲4.6144.83 ▲15.28
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius7.9140.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 169 new files
Database: no new tables, 5 new options
New WordPress options
fs_debug_mode
fs_api_cache
fs_active_plugins
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

A check of browser resources used by Cartoon Url
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,844 ▲10216.43 ▲0.486.02 ▲0.082.27 ▼0.15
Dashboard /wp-admin2,966 ▲826.49 ▼0.04132.84 ▼10.39169.81 ▲4.12
Posts /wp-admin/edit.php2,708 ▲143.43 ▲0.0162.51 ▲2.09153.00 ▲11.35
Add New Post /wp-admin/post-new.php1,660 ▼019.86 ▲2.13429.08 ▲48.43145.90 ▼23.69
Media Library /wp-admin/upload.php1,746 ▲455.72 ▲0.01142.71 ▲7.08202.06 ▲7.52
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius1,4662.6558.87145.92

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
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • fs_accounts
    • fs_debug_mode
    • fs_api_cache
    • fs_active_plugins
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cartoon-url/freemius/templates/ajax-loader.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/cartoon-url/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cartoon-url/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cartoon-url/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/cartoon-url/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/cartoon-url/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cartoon-url/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/cartoon-url/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/cartoon-url/freemius/templates/partials/network-activation.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #1, #2 in cartoon-url/assets to your readme.txt
You can look at the official readme.txt

cartoon-url/cartoon_url.php 92% from 13 tests

The main PHP file in "Cartoon Url" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cartoon-url.php" instead of "cartoon_url.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected41,118 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
PHP1056,68915,29828,042
PO File105,7106,91312,558
JavaScript45764271
Markdown2650207
JSON10027
CSS100013

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,609)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity82.93
▷ Minimum class complexity1.00
▷ Maximum class complexity2,609.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods1,080
▷ Static methods17015.74%
▷ Public methods74969.35%
▷ Protected methods151.39%
▷ Private methods31629.26%
Functions98
▷ Named functions98100.00%
▷ Anonymous functions00.00%
Constants120
▷ Global constants9780.83%
▷ Class constants2319.17%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%