90% dadevarzan-wp-book

Code Review | Dadevarzan WordPress Book

WordPress plugin Dadevarzan WordPress Book scored90%from 54 tests.

About plugin

  • Plugin page: dadevarzan-wp-book
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Jan 29, 2019
  • Latest release: May 31, 2022
  • Number of updates: 9
  • Update frequency: every 135.4 days
  • Top authors: dadevarzan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /793 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.14MB] [CPU: ▼3.58ms] Passed 4 tests

This is a short check of server-side resources used by Dadevarzan WordPress Book
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1539.64 ▼3.15
Dashboard /wp-admin3.44 ▲0.1051.99 ▼13.87
Posts /wp-admin/edit.php3.55 ▲0.1952.40 ▲0.66
Add New Post /wp-admin/post-new.php6.13 ▲0.2495.80 ▲3.69
Media Library /wp-admin/upload.php3.36 ▲0.1340.69 ▲2.04

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

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

Browser metrics Passed 4 tests

Dadevarzan WordPress Book: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3714.74 ▲0.351.73 ▼0.2243.33 ▼0.94
Dashboard /wp-admin2,226 ▲495.62 ▲0.0990.85 ▼13.0845.39 ▲3.69
Posts /wp-admin/edit.php2,134 ▲342.03 ▲0.0339.87 ▲3.2535.89 ▲0.04
Add New Post /wp-admin/post-new.php1,552 ▲2123.13 ▲0.02599.59 ▼101.6857.99 ▲1.94
Media Library /wp-admin/upload.php1,431 ▲314.16 ▼0.0596.91 ▼11.9041.05 ▼5.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, 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 Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: wp, dadehvarzan, book cpt, wordpress, dadevarzan...

dadevarzan-wp-book/dadevarzan-wp-book.php Passed 13 tests

The primary PHP file in "Dadevarzan WordPress Book" version 1.2.4 is used by WordPress to initiate all plugin functionality
28 characters long description:
book post type for wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin576 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28517503
PO File1273068
JavaScript1305

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods872.73%
▷ Public methods1090.91%
▷ Protected methods19.09%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.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
PNG images were not found in this plugin