84% virtual-library

Code Review | Virtual Library

WordPress plugin Virtual Library scored84%from 54 tests.

About plugin

  • Plugin page: virtual-library
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.4-5.8
  • WordPress version: 6.3.1
  • First release: Jul 14, 2021
  • Latest release: Jul 21, 2021
  • Number of updates: 15
  • Update frequency: every 0.5 days
  • Top authors: lgolabek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.90ms] Passed 4 tests

Analyzing server-side resources used by Virtual Library
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.59 ▼2.10
Dashboard /wp-admin3.40 ▲0.0945.16 ▼1.87
Posts /wp-admin/edit.php3.45 ▲0.0948.67 ▲1.64
Add New Post /wp-admin/post-new.php5.98 ▲0.1093.66 ▼1.28
Media Library /wp-admin/upload.php3.32 ▲0.0937.43 ▲2.22
Add New /wp-admin/post-new.php?post_type=book3.4753.57
Books Category /wp-admin/edit-tags.php?taxonomy=book-category&post_type=book3.3137.47
All Books /wp-admin/edit.php?post_type=book3.3636.12
Hashtag /wp-admin/edit-tags.php?taxonomy=book-hashtags&post_type=book3.3134.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Virtual Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲11613.22 ▼1.331.88 ▼0.2340.88 ▼4.59
Dashboard /wp-admin2,274 ▲865.85 ▼0.0098.96 ▼3.4341.66 ▲0.10
Posts /wp-admin/edit.php2,160 ▲682.01 ▲0.0240.62 ▼0.7935.63 ▲0.53
Add New Post /wp-admin/post-new.php1,570 ▲5617.86 ▲0.20658.25 ▼22.1654.02 ▼5.01
Media Library /wp-admin/upload.php1,459 ▲684.15 ▼0.05112.42 ▲18.0651.56 ▲5.84
Add New /wp-admin/post-new.php?post_type=book2,8407.94179.6769.73
Books Category /wp-admin/edit-tags.php?taxonomy=book-category&post_type=book1,3302.2728.5532.14
All Books /wp-admin/edit.php?post_type=book1,1851.9631.4831.04
Hashtag /wp-admin/edit-tags.php?taxonomy=book-hashtags&post_type=book1,3052.3127.5532.42

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/virtual-library/templates/hashtags-book-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/virtual-library/templates/single-book-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/virtual-library/virtual-library.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/virtual-library/templates/category-book-template.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === virtual-library === )
You can look at the official readme.txt

virtual-library/virtual-library.php Passed 13 tests

"Virtual Library" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
67 characters long description:
Plugin develop Wordpress and making from your site virtual library.

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 detected1,104 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP417248523
PO File2148174410
CSS1451153
SVG30218

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin