10% my-google-books-library

Code Review | My Google Books Library

WordPress plugin My Google Books Library scored 10% from 54 tests.

About plugin

  • Plugin page: my-google-books-l...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Dec 20, 2012
  • Latest release: Mar 7, 2013
  • Number of updates: 20
  • Update frequency: every 4.1 days
  • Top authors: hugmin42 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 2,865 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/my-google-books-library/my-google-books-library.php+34
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.07ms] Passed 4 tests

An overview of server-side resources used by My Google Books Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.32 ▼40.42
Dashboard /wp-admin2.05 ▼1.265.65 ▼44.82
Posts /wp-admin/edit.php2.05 ▼1.316.35 ▼41.37
Add New Post /wp-admin/post-new.php2.05 ▼3.845.45 ▼89.66
Media Library /wp-admin/upload.php2.05 ▼1.185.81 ▼29.16
My Google Books Library /wp-admin/options-general.php?page=my-google-books-library/my-google-books-library.php2.055.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for My Google Books Library
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.131.49 ▼0.3540.55 ▼7.00
Dashboard /wp-admin2,210 ▲225.85 ▲0.9599.31 ▼23.7036.37 ▼8.18
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0138.06 ▲3.9035.64 ▼0.66
Add New Post /wp-admin/post-new.php1,545 ▲2618.46 ▼4.62608.87 ▼81.7159.00 ▲4.15
Media Library /wp-admin/upload.php1,392 ▲74.26 ▲0.0994.77 ▼52.8943.13 ▼13.55
My Google Books Library /wp-admin/options-general.php?page=my-google-books-library/my-google-books-library.php8942.0424.4026.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/my-google-books-library/my-google-books-library.php+34
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_my_google_books_library_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=my-google-books-library/my-google-books-library.php
    • > Deprecated in wp-content/plugins/my-google-books-library/my-google-books-library.php+34
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=my-google-books-library/my-google-books-library.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in my_google_books_library_widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/my-google-books-library/my-google-books-library.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (18 tag instead of maximum 10)
  • Screenshots: These screenshots do not have images: #1 (An example of how the plugin functions and works on the new twentytwelve theme.), #2 (Example of how the shortcode is used on a page.), #3 (My Google Books Library Settings page), #4 (My Google Books Library widgets)
  • Plugin Name: You should set the name of your plugin on the first line ( === my-google-books-library === )
Please take inspiration from this readme.txt

my-google-books-library/my-google-books-library.php 92% from 13 tests

Analyzing the main PHP file in "My Google Books Library" version 1.2
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected322 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17953322

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.30
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.33MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png36.37KB13.18KB▼ 63.76%
screenshot-3.png138.56KB49.73KB▼ 64.11%
screenshot-1.png117.90KB36.89KB▼ 68.71%
screenshot-2.png29.77KB11.70KB▼ 60.69%
book.png17.68KB8.13KB▼ 53.99%