72% embed-kindle

Code Review | Embed Kindle

WordPress plugin Embed Kindle scored72%from 54 tests.

About plugin

  • Plugin page: embed-kindle
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 1, 2012
  • Latest release: Nov 2, 2012
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: akky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,365 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.09ms] Passed 4 tests

Server-side resources used by Embed Kindle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.62 ▼1.66
Dashboard /wp-admin3.34 ▼0.0043.99 ▼15.98
Posts /wp-admin/edit.php3.39 ▲0.0446.09 ▲0.75
Add New Post /wp-admin/post-new.php5.94 ▲0.0596.33 ▼8.61
Media Library /wp-admin/upload.php3.26 ▲0.0431.09 ▼10.12
Embed Kindle /wp-admin/options-general.php?page=akky_embed_kindle3.2131.34

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Embed Kindle
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.56 ▼1.001.96 ▲0.1936.55 ▼7.47
Dashboard /wp-admin2,212 ▲215.83 ▲0.9296.65 ▼8.4540.29 ▼0.32
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0138.81 ▼1.3836.50 ▼0.81
Add New Post /wp-admin/post-new.php1,522 ▲223.04 ▼0.22658.53 ▲37.6957.10 ▼0.67
Media Library /wp-admin/upload.php1,397 ▲94.25 ▲0.0295.09 ▼6.4741.87 ▼1.52
Embed Kindle /wp-admin/options-general.php?page=akky_embed_kindle7772.0525.5631.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=akky_embed_kindle
    • > Notice in wp-content/plugins/embed-kindle/includes/Akky/EmbedKindle.php+186
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/embed-kindle/includes/Akky/EmbedKindle.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=akky_embed_kindle
    • > Network (severe)
    http://kindleweb.s3.amazonaws.com/app/KindleReader-min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Kindle Reader embedded on a post) image required
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

embed-kindle/embed-kindle.php Passed 13 tests

The main PHP script in "Embed Kindle" version 1.0.1 is automatically included on every request by WordPress
19 characters long description:
embed Kindle e-book

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
No dangerous file extensions were detected225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22614192
PO File18124833

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods1292.31%
▷ Protected methods17.69%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png70.90KB22.86KB▼ 67.75%