84% kindle-best-seller-calculator

Code Review | Kindle Best Seller Calculator

WordPress plugin Kindle Best Seller Calculator scored84%from 54 tests.

About plugin

  • Plugin page: kindle-best-selle...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Jun 17, 2015
  • Number of updates: 37
  • Update frequency: every 0.4 days
  • Top authors: farhanz2009 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.90ms] Passed 4 tests

An overview of server-side resources used by Kindle Best Seller Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.58 ▼7.03
Dashboard /wp-admin3.32 ▼0.0343.28 ▼14.73
Posts /wp-admin/edit.php3.37 ▲0.0146.47 ▲1.75
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.28 ▼12.12
Media Library /wp-admin/upload.php3.24 ▲0.0134.53 ▼1.72

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kindle Best Seller Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.22 ▼1.531.64 ▼0.1040.21 ▲0.50
Dashboard /wp-admin2,206 ▲185.84 ▲0.95111.12 ▼0.9942.94 ▼2.02
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0034.19 ▼1.4131.48 ▼6.49
Add New Post /wp-admin/post-new.php1,532 ▼1023.02 ▲4.72663.57 ▲20.1657.82 ▲6.25
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0399.96 ▼0.6044.58 ▲0.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 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)
Good news, no errors were detected

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
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_filter() in wp-content/plugins/kindle-best-seller-calculator/kindle-rank-calculator.php:350

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: amazon rank, kindle, kindle seller rank, kindleprneur, best...

kindle-best-seller-calculator/kindle-rank-calculator.php 92% from 13 tests

"Kindle Best Seller Calculator" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("kindle-best-seller-calculator.php" instead of "kindle-rank-calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin139 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1397132
CSS1127

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/crown.PNG3.02KB2.16KB▼ 28.50%