84% share-goodreads-update

Code Review | Share Goodreads Update

WordPress plugin Share Goodreads Update scored84%from 54 tests.

About plugin

  • Plugin page: share-goodreads-u...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 27, 2021
  • Latest release: Aug 31, 2021
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: estephan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /951 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.69ms] Passed 4 tests

An overview of server-side resources used by Share Goodreads Update
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.59 ▼6.33
Dashboard /wp-admin3.31 ▲0.0143.56 ▼5.52
Posts /wp-admin/edit.php3.36 ▲0.0148.10 ▲4.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.68 ▼5.37
Media Library /wp-admin/upload.php3.24 ▲0.0132.33 ▼1.53

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Share Goodreads Update
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4514.48 ▲0.101.79 ▼0.2940.34 ▼4.82
Dashboard /wp-admin2,209 ▲215.86 ▲0.03105.62 ▼3.1939.98 ▼3.10
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0535.11 ▼0.6330.50 ▼3.91
Add New Post /wp-admin/post-new.php1,514 ▼1917.58 ▼5.47662.84 ▼38.4555.33 ▼0.80
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0298.15 ▼7.2841.93 ▼2.73

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_sgru_readingupdate

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/share-goodreads-update/ShareGoodreadsUpdate.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: isbn, goodreads, data, readers

share-goodreads-update/ShareGoodreadsUpdate.php 85% from 13 tests

The main PHP script in "Share Goodreads Update" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("share-goodreads-update.php" instead of "ShareGoodreadsUpdate.php")
  • Description: The description should be shorter than 140 characters (currently 182 characters long)

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
There were no executable files found in this plugin1,910 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23943321,850
CSS113260

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity135.67
▷ Minimum class complexity20.00
▷ Maximum class complexity249.00
Average method complexity5.30
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods94
▷ Static methods11.06%
▷ Public methods7984.04%
▷ Protected methods1515.96%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin