79% kitsu-api-list

Code Review | Kitsu API List

WordPress plugin Kitsu API List scored79%from 54 tests.

About plugin

  • Plugin page: kitsu-api-list
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 12, 2018
  • Latest release: Jul 12, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: filipesm7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /723 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.07MB] [CPU: ▼17.14ms] Passed 4 tests

This is a short check of server-side resources used by Kitsu API List
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.50 ▲2.64
Dashboard /wp-admin3.37 ▲0.0748.58 ▼7.55
Posts /wp-admin/edit.php3.48 ▲0.1349.92 ▼0.24
Add New Post /wp-admin/post-new.php5.95 ▲0.0794.60 ▼63.40
Media Library /wp-admin/upload.php3.29 ▲0.0637.48 ▲3.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_kitsu-api-list_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kitsu API List
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲3113.59 ▼0.621.68 ▼0.8144.98 ▲0.78
Dashboard /wp-admin2,224 ▲185.90 ▲0.01108.55 ▼5.5241.35 ▼2.78
Posts /wp-admin/edit.php2,100 ▼02.04 ▼0.0141.10 ▲1.3235.61 ▲0.02
Add New Post /wp-admin/post-new.php1,545 ▲1423.29 ▲0.03676.43 ▲28.6854.61 ▼1.78
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0797.02 ▼11.4242.58 ▼14.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_kitsu-api-list_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/kitsu-api-list/public/partials/kitsu-api-list-widget-display.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/kitsu-api-list/public/partials/kitsu-api-list-widget-display.php on line 7
    • > PHP Notice
      Undefined variable: list in wp-content/plugins/kitsu-api-list/public/partials/kitsu-api-list-widget-display.php on line 7
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/kitsu-api-list/public/partials/kitsu-api-list-widget-display.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/kitsu-api-list/admin/partials/kitsu-api-list-widget-admin-display.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/kitsu-api-list/public/partials/kitsu-api-list-widget-display.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/kitsu-api-list/public/class-kitsu-api-list-widget.php:4
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/kitsu-api-list/public/partials/kitsu-api-list-widget-display.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/kitsu-api-list/public/partials/kitsu-api-list-widget-display.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
No tags were found

kitsu-api-list/kitsu-api-list.php Passed 13 tests

The entry point to "Kitsu API List" version 1.0.0 is a PHP file that has certain tags in its header comment area
137 characters long description:
Kitsu API List is a widget that allows you a list of anime or manga from their database, while giving the ability to customize your list.

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
Good job! No executable or dangerous file extensions detected334 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12143520308
CSS15426

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods33
▷ Static methods721.21%
▷ Public methods2472.73%
▷ Protected methods00.00%
▷ Private methods927.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected