77% cute-animals

Code Review | Cute Animals

WordPress plugin Cute Animals scored77%from 54 tests.

About plugin

  • Plugin page: cute-animals
  • Plugin version: 1.00
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: May 21, 2021
  • Latest release: Jul 31, 2023
  • Number of updates: 10
  • Update frequency: every 80.1 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /621 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.16ms] Passed 4 tests

This is a short check of server-side resources used by Cute Animals
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.64 ▼6.65
Dashboard /wp-admin3.32 ▲0.0248.57 ▼4.56
Posts /wp-admin/edit.php3.37 ▲0.0251.85 ▼0.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.41 ▼0.49
Media Library /wp-admin/upload.php3.25 ▲0.0237.28 ▲1.65
Cute Animals settings /wp-admin/options-general.php?page=cute_animals_settings3.2232.50

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Cute Animals
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.72 ▼0.011.79 ▼0.0642.59 ▼4.95
Dashboard /wp-admin2,201 ▲215.63 ▲0.0392.98 ▼0.6943.01 ▲6.50
Posts /wp-admin/edit.php2,106 ▲31.97 ▼0.0140.68 ▲1.0237.15 ▲1.15
Add New Post /wp-admin/post-new.php1,540 ▲1218.33 ▼4.91612.62 ▼93.5464.31 ▲1.91
Media Library /wp-admin/upload.php1,409 ▲64.22 ▼0.0298.20 ▲3.3442.85 ▼1.10
Cute Animals settings /wp-admin/options-general.php?page=cute_animals_settings8842.0026.1029.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cute_animals_settings
    • > Notice in wp-content/plugins/cute-animals/views/settings.php+12
    Trying to get property 'sprite' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cute_animals_settings
    • > Notice in wp-content/plugins/cute-animals/views/settings.php+21
    Trying to get property 'direction' of non-object
    • > GET request to /wp-admin/options-general.php?page=cute_animals_settings
    • > Notice in wp-content/plugins/cute-animals/views/settings.php+24
    Trying to get property 'speed' of non-object
    • > GET request to /wp-admin/options-general.php?page=cute_animals_settings
    • > Notice in wp-content/plugins/cute-animals/views/settings.php+26
    Trying to get property 'position' of non-object

SRP 50% 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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cute-animals/animals.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/cute-animals/views/settings.php:4

User-side errors Passed 1 test

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


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === cute-animals === )
The official readme.txt is a good inspiration

cute-animals/animals.php 77% from 13 tests

This is the main PHP file of "Cute Animals" version 1.00, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")
  • Main file name: The principal plugin file should be the same as the plugin slug ("cute-animals.php" instead of "animals.php")

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
Success! There were no dangerous files found in this plugin274 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
9 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/save.png0.54KB0.39KB▼ 28.11%
sprites/dog.png2.70KB2.64KB▼ 2.21%
sprites/bird.png6.35KB2.03KB▼ 68.06%
images/fb.png1.59KB1.00KB▼ 37.42%