68% wp-anigrab

Code Review | WP ANIGRAB

WordPress plugin WP ANIGRAB scored 68% from 54 tests.

About plugin

  • Plugin page: wp-anigrab
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 13, 2019
  • Latest release: Jan 13, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: rennz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.32MB] [CPU: ▲2.35ms] Passed 4 tests

A check of server-side resources used by WP ANIGRAB
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3443.59 ▲1.05
Dashboard /wp-admin3.66 ▲0.3648.85 ▼0.32
Posts /wp-admin/edit.php3.71 ▲0.3654.39 ▲6.90
Add New Post /wp-admin/post-new.php6.19 ▲0.3095.39 ▲2.50
Media Library /wp-admin/upload.php3.52 ▲0.2939.18 ▲6.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 395 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP ANIGRAB
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.30 ▼0.992.05 ▼0.1736.66 ▼12.45
Dashboard /wp-admin2,206 ▲185.86 ▲0.98107.27 ▲0.9239.46 ▼1.18
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0639.61 ▲1.1436.24 ▼3.20
Add New Post /wp-admin/post-new.php1,534 ▲1121.06 ▼2.15684.58 ▲23.0952.95 ▼6.71
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0196.05 ▲2.4643.27 ▲0.55

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-anigrab/vendor/mustache/mustache/bin/build_bootstrap.php
    • > /wp-content/plugins/wp-anigrab/tests/bootstrap.php
    • > /wp-content/plugins/wp-anigrab/wp-anigrab.php
  • 169× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-anigrab/vendor/mustache/mustache/test/Mustache/Test/Logger/StreamLoggerTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Jikan\\Lib\\Parser\\TemplateParse' not found in wp-content/plugins/wp-anigrab/vendor/jikan-me/jikan/src/Lib/Parser/PersonParse.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Jikan\\Get\\Get' not found in wp-content/plugins/wp-anigrab/vendor/jikan-me/jikan/src/Get/Manga.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Jikan\\Model\\Model' not found in wp-content/plugins/wp-anigrab/vendor/jikan-me/jikan/src/Model/MangaNews.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-anigrab/vendor/mustache/mustache/test/Mustache/Test/Functional/CallTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/wp-anigrab/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Jikan\\Get\\Get' not found in wp-content/plugins/wp-anigrab/vendor/jikan-me/jikan/src/Get/Anime.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-anigrab/vendor/mustache/mustache/test/Mustache/Test/AutoloaderTest.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/wp-anigrab/vendor/guzzlehttp/promises/src/RejectedPromise.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/wp-anigrab/vendor/guzzlehttp/guzzle/src/Pool.php:19

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 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
3 plugin tags: grab, manga, anime

wp-anigrab/wp-anigrab.php Passed 13 tests

"WP ANIGRAB" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
48 characters long description:
grab anime info and save to local WordPress post

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .ms - Maxwell Script in Maxwell Render
      • wp-content/plugins/wp-anigrab/vendor/mustache/mustache/test/fixtures/templates/alpha.ms
      • wp-content/plugins/wp-anigrab/vendor/mustache/mustache/test/fixtures/templates/beta.ms
23,985 lines of code in 346 files:
LanguageFilesBlank linesComment linesLines of code
PHP2764,1898,92219,240
Markdown151,12103,721
JSON900630
Mustache3610145
Bourne Shell12111120
YAML415061
XML46059
make1409

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.22
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces14
Interfaces20
Traits2
Classes254
▷ Abstract classes83.15%
▷ Concrete classes24696.85%
▷ Final classes83.25%
Methods1,190
▷ Static methods957.98%
▷ Public methods99483.53%
▷ Protected methods231.93%
▷ Private methods17314.54%
Functions299
▷ Named functions5719.06%
▷ Anonymous functions24280.94%
Constants265
▷ Global constants14052.83%
▷ Class constants12547.17%
▷ Public constants125100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png237.93KB84.17KB▼ 64.62%