84% cover3d

Code Review | Cover3D

WordPress plugin Cover3D scored84%from 54 tests.

About plugin

  • Plugin page: cover3d
  • Plugin version: 0.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Jun 13, 2023
  • Latest release: Oct 27, 2023
  • Number of updates: 11
  • Update frequency: every 12.5 days
  • Top authors: pagelab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /285 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.02MB] [CPU: ▼4.74ms] Passed 4 tests

An overview of server-side resources used by Cover3D
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.75 ▼2.29
Dashboard /wp-admin3.32 ▲0.0244.41 ▼2.45
Posts /wp-admin/edit.php3.43 ▲0.0848.18 ▲1.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.25 ▼14.23
Media Library /wp-admin/upload.php3.24 ▲0.0133.45 ▲0.01

Server storage [IO: ▲0.15MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Cover3D
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.57 ▼0.041.60 ▼0.0838.59 ▼3.96
Dashboard /wp-admin2,192 ▲175.53 ▼0.1282.93 ▼21.7841.05 ▼0.87
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0339.66 ▲0.8737.24 ▲2.02
Add New Post /wp-admin/post-new.php1,545 ▲623.21 ▲0.04653.13 ▲45.8636.38 ▼22.05
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.0696.33 ▼1.8840.73 ▼3.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'PG_Blocks' not found in wp-content/plugins/cover3d/blocks/book/book_register.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_unique_id() in wp-content/plugins/cover3d/blocks/book/book.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: A description for screenshot #4 is required in cover3d/assets to your readme.txt
The official readme.txt might help

cover3d/cover3d.php Passed 13 tests

The main file in "Cover3D" v. 0.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
A block that displays a 3D book cover, animated when you mouse over it.

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 plugin2,226 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2112121,020
PHP510895664
CSS35720376
PO File15877125
Markdown116041

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity32.25
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods33
▷ Static methods33100.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/cover.png2.64KB2.64KB0.00%
assets/cover2x.png7.92KB6.68KB▼ 15.73%