68% wp-publication-manager

Code Review | Wordpress Book List

WordPress plugin Wordpress Book List scored68%from 54 tests.

About plugin

  • Plugin page: wp-publication-ma...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Nov 25, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: rajib00002 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼8.52ms] Passed 4 tests

Server-side resources used by Wordpress Book List
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2338.07 ▼4.69
Dashboard /wp-admin3.52 ▲0.1846.18 ▼16.05
Posts /wp-admin/edit.php3.64 ▲0.2850.82 ▲3.88
Add New Post /wp-admin/post-new.php6.11 ▲0.2289.25 ▼14.69
Media Library /wp-admin/upload.php3.44 ▲0.2135.40 ▲1.34
Publishers /wp-admin/edit-tags.php?taxonomy=books_publisher&post_type=books3.4435.02
Authors /wp-admin/edit-tags.php?taxonomy=books_author&post_type=books3.4433.25
Books /wp-admin/edit.php?post_type=books3.4934.60

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 1,663 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress Book List
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.40 ▼0.361.71 ▼0.6045.27 ▲2.39
Dashboard /wp-admin2,227 ▲475.64 ▼0.0183.59 ▼8.0337.44 ▼3.73
Posts /wp-admin/edit.php2,135 ▲322.02 ▲0.0238.58 ▲2.0430.65 ▼4.04
Add New Post /wp-admin/post-new.php1,552 ▲2423.21 ▲0.26622.76 ▲1.0251.07 ▼18.60
Media Library /wp-admin/upload.php1,426 ▲324.22 ▲0.0699.54 ▼3.0143.29 ▲2.47
Publishers /wp-admin/edit-tags.php?taxonomy=books_publisher&post_type=books1,2772.1130.4227.89
Authors /wp-admin/edit-tags.php?taxonomy=books_author&post_type=books1,3082.1328.1827.21
Books /wp-admin/edit.php?post_type=books1,1681.9831.0330.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-publication-manager/vendor/automattic/vipwpcs/WordPressVIPMinimum/ruleset-test.php
    • > /wp-content/plugins/wp-publication-manager/vendor/automattic/vipwpcs/tests/bootstrap.php
    • > /wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/scripts/build-phar.php
    • > /wp-content/plugins/wp-publication-manager/vendor/automattic/vipwpcs/WordPress-VIP-Go/ruleset-test.php
  • 707× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WordPressCS\\WordPress\\Sniff' not found in wp-content/plugins/wp-publication-manager/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WordPressVIPMinimum\\Sniffs\\Sniff' not found in wp-content/plugins/wp-publication-manager/vendor/automattic/vipwpcs/WordPressVIPMinimum/Sniffs/Security/EscapingVoidReturnFunctionsSniff.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WordPressCS\\WordPress\\AbstractFunctionRestrictionsSniff' not found in wp-content/plugins/wp-publication-manager/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% 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: contact, contact us, contactum

wp-publication-manager/wpum.php 92% from 13 tests

"Wordpress Book List" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-publication-manager.php" instead of "wpum.php")

Code Analysis 3% 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
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
      • wp-content/plugins/wp-publication-manager/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
94,074 lines of code in 1,296 files:
LanguageFilesBlank linesComment linesLines of code
PHP88519,94134,96476,243
XML1684107575,984
Pascal1202,5285,2375,437
JavaScript657918622,248
Markdown1151602,195
CSS382512031,590
JSON100219
XSD160130
Bourne Again Shell576118
DOS Batch241010

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 316)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity15.43
▷ Minimum class complexity1.00
▷ Maximum class complexity462.00
Average method complexity6.09
▷ Minimum method complexity1.00
▷ Maximum method complexity316.00
Code structure
Namespaces190
Interfaces2
Traits0
Classes734
▷ Abstract classes172.32%
▷ Concrete classes71797.68%
▷ Final classes20.28%
Methods2,098
▷ Static methods683.24%
▷ Public methods1,73582.70%
▷ Protected methods26912.82%
▷ Private methods944.48%
Functions12
▷ Named functions650.00%
▷ Anonymous functions650.00%
Constants131
▷ Global constants10479.39%
▷ Class constants2720.61%
▷ Public constants27100.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