10% isbn-book-search

Code Review | ISBN Book Search

WordPress plugin ISBN Book Search scored10%from 54 tests.

About plugin

  • Plugin page: isbn-book-search
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 24, 2017
  • Latest release: Dec 6, 2017
  • Number of updates: 5
  • Update frequency: every 63.0 days
  • Top authors: haseebayazi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,241 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/isbn-book-search/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; isbnbooksearch has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼55.01ms] Passed 4 tests

A check of server-side resources used by ISBN Book Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.403.89 ▼38.33
Dashboard /wp-admin2.09 ▼1.226.15 ▼45.30
Posts /wp-admin/edit.php2.09 ▼1.276.72 ▼42.96
Add New Post /wp-admin/post-new.php2.09 ▼3.815.42 ▼93.43
Media Library /wp-admin/upload.php2.09 ▼1.155.56 ▼30.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ISBN Book Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.28 ▼0.151.57 ▼0.4241.43 ▲0.68
Dashboard /wp-admin2,195 ▲185.54 ▼0.0887.17 ▼1.4643.18 ▲2.83
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.1536.22 ▲0.9134.20 ▼4.61
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.03688.59 ▲5.3258.05 ▲0.11
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.05113.29 ▲2.6850.25 ▲1.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/isbn-book-search/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; isbnbooksearch has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_isbnbooksearch

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/isbn-book-search/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: books, ebooks, isbn-10, isbn-13, amazon...

isbn-book-search/index.php 92% from 13 tests

The main PHP file in "ISBN Book Search" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("isbn-book-search.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113942

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin