77% toy-drive-community-edition

Code Review | Toy Drive Community Edition

WordPress plugin Toy Drive Community Edition scored77%from 54 tests.

About plugin

  • Plugin page: toy-drive-communi...
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 5, 2022
  • Latest release: Jan 5, 2022
  • Number of updates: 37
  • Update frequency: N/A
  • Top authors: magicboxsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /210 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.42ms] Passed 4 tests

This is a short check of server-side resources used by Toy Drive Community Edition
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.99 ▲0.14
Dashboard /wp-admin3.35 ▲0.0050.24 ▼17.44
Posts /wp-admin/edit.php3.40 ▲0.0452.78 ▼0.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.95 ▼4.11
Media Library /wp-admin/upload.php3.27 ▲0.0440.56 ▲3.86

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Toy Drive Community Edition
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.41 ▲0.012.56 ▲0.6444.27 ▲0.56
Dashboard /wp-admin2,206 ▲295.60 ▼0.0987.74 ▼4.0378.30 ▲33.40
Posts /wp-admin/edit.php2,111 ▲111.98 ▼0.1939.20 ▲1.3737.75 ▲0.79
Add New Post /wp-admin/post-new.php1,536 ▲323.46 ▲0.07705.30 ▲32.0359.45 ▲2.07
Media Library /wp-admin/upload.php1,411 ▲114.13 ▼0.1498.87 ▼3.2379.79 ▲34.64

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/toy-drive-community-edition/index.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/toy-drive-community-edition/toy-drive.php:185
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toy-drive-community-edition/include/api.php:81

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: angel tree, christmas, toy drive

toy-drive-community-edition/toy-drive.php 69% from 13 tests

The entry point to "Toy Drive Community Edition" version 1.1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 153 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("toy-drive-community-edition.php" instead of "toy-drive.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin788 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP32747419
JavaScript364109322
CSS2203647

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
toylogo16.png2.89KB0.65KB▼ 77.46%
toylogo.png14.67KB2.95KB▼ 79.92%