10% daily-free-kindle-books

Code Review | Daily Free Kindle Books

WordPress plugin Daily Free Kindle Books scored10%from 54 tests.

About plugin

  • Plugin page: daily-free-kindle...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1+
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Feb 8, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: hidohebhi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,244 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
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/daily-free-kindle-books/daily-free-kindle-books.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; DailyFreeKindleBooksWidget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼52.57ms] Passed 4 tests

A check of server-side resources used by Daily Free Kindle Books
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.94 ▼38.27
Dashboard /wp-admin2.11 ▼1.196.53 ▼42.37
Posts /wp-admin/edit.php2.11 ▼1.257.66 ▼35.75
Add New Post /wp-admin/post-new.php2.11 ▼3.785.55 ▼93.89
Media Library /wp-admin/upload.php2.11 ▼1.126.12 ▼26.62

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_dailyfreekindlebookswidget

Browser metrics Passed 4 tests

A check of browser resources used by Daily Free Kindle Books
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.17 ▼1.212.09 ▲0.1444.73 ▼4.36
Dashboard /wp-admin2,209 ▲214.81 ▼1.1097.12 ▼18.0538.61 ▼6.73
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0337.25 ▲2.8830.78 ▼3.64
Add New Post /wp-admin/post-new.php1,546 ▲1018.14 ▼4.98616.93 ▼48.7166.94 ▲13.28
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0294.78 ▼13.6039.71 ▼6.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/daily-free-kindle-books/daily-free-kindle-books.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; DailyFreeKindleBooksWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_dailyfreekindlebookswidget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/daily-free-kindle-books/daily-free-kindle-books.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (This is a screenshot of the plugin as it appears on the front-end of a website.), #2 (This is a screenshot of the backend of the plugin, where you can customize options.)
  • Tested up to: The plugin version is formatted incorrectly
Please take inspiration from this readme.txt

daily-free-kindle-books/daily-free-kindle-books.php Passed 13 tests

Analyzing the main PHP file in "Daily Free Kindle Books" version 1.0.1
93 characters long description:
This plugin creates a widget that loads daily free Kindle books with your unique affiliate ID

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1231091

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 1.27MB with 0.66MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png744.90KB336.51KB▼ 54.83%
screenshot-2.png558.52KB286.74KB▼ 48.66%