83% display-good-reads-books

Code Review | Good Reads Books

WordPress plugin Good Reads Books scored83%from 54 tests.

About plugin

  • Plugin page: display-good-read...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: Dec 7, 2017
  • Number of updates: 10
  • Update frequency: every 15.9 days
  • Top authors: davidsword (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /4,545 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Good Reads Books
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1145.64 ▼0.11
Dashboard /wp-admin3.46 ▲0.1672.62 ▲26.28
Posts /wp-admin/edit.php3.43 ▲0.0849.62 ▼2.62
Add New Post /wp-admin/post-new.php5.96 ▲0.0896.63 ▼12.09
Media Library /wp-admin/upload.php3.31 ▲0.0837.10 ▼2.86
Good Reads Books /wp-admin/options-general.php?page=goodrds3.2637.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Good Reads Books
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.57 ▼1.186.00 ▲3.9638.82 ▼0.41
Dashboard /wp-admin2,210 ▲194.88 ▲0.02115.80 ▲13.0243.80 ▲1.78
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0339.01 ▼1.2735.72 ▼3.28
Add New Post /wp-admin/post-new.php1,536 ▲1623.23 ▼0.11658.95 ▲10.2355.70 ▲4.00
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0194.70 ▼7.9041.87 ▼1.32
Good Reads Books /wp-admin/options-general.php?page=goodrds1,0392.2127.9836.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-good-reads-books/good-reads-books.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

display-good-reads-books/good-reads-books.php 85% from 13 tests

"Good Reads Books" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("display-good-reads-books.php" instead of "good-reads-books.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected400 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP276137357
JavaScript22022
CSS20021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin