84% cat-game

Code Review | Cat Game

WordPress plugin Cat Game scored84%from 54 tests.

About plugin

  • Plugin page: cat-game
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.0
  • WordPress version: 6.3.1
  • First release: Aug 15, 2014
  • Latest release: Aug 22, 2014
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: tleen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,871 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by Cat Game
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.78 ▲4.56
Dashboard /wp-admin3.32 ▲0.0249.38 ▼4.07
Posts /wp-admin/edit.php3.37 ▲0.0251.33 ▼0.97
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.84 ▼20.13
Media Library /wp-admin/upload.php3.25 ▲0.0237.28 ▼3.25

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
wp-cat-game-mac-email
can_compress_scripts
wp-cat-game-threshold
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Cat Game
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.391.71 ▲0.1244.47 ▲3.27
Dashboard /wp-admin2,198 ▲215.51 ▼0.0786.16 ▼14.3939.50 ▼8.17
Posts /wp-admin/edit.php2,103 ▲32.04 ▲0.1033.82 ▼2.8335.81 ▲0.88
Add New Post /wp-admin/post-new.php1,531 ▲523.17 ▼0.48676.85 ▼18.2355.53 ▼4.48
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.03100.20 ▼13.7344.82 ▼2.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • wp-cat-game-mac-email
    • wp-cat-game-threshold
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/cat-game/test/wp-cat-game-test.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Without the plugin.), #2 (With the plugin.), #3 (We have a winner!)
The official readme.txt is a good inspiration

cat-game/wp-cat-game.php 92% from 13 tests

The main file in "Cat Game" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cat-game.php" instead of "wp-cat-game.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin166 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25061166

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.25MB with 0.15MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/avatar.png15.67KB7.59KB▼ 51.56%
assets/screenshot-3.png129.72KB47.99KB▼ 63.01%
assets/screenshot-2.png56.45KB19.50KB▼ 65.45%
assets/screenshot-1.png53.57KB18.20KB▼ 66.03%