84% pootle-button

Code Review | pootle button

WordPress plugin pootle button scored84%from 54 tests.

About plugin

  • Plugin page: pootle-button
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-5.0.0
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: Dec 10, 2018
  • Number of updates: 13
  • Update frequency: every 77.8 days
  • Top authors: shramee (53.85%)jamesmarsland (53.85%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼14.85ms] Passed 4 tests

Analyzing server-side resources used by pootle button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.26 ▲1.79
Dashboard /wp-admin3.31 ▲0.0145.68 ▼11.17
Posts /wp-admin/edit.php3.36 ▲0.0146.10 ▼4.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.72 ▼43.52
Media Library /wp-admin/upload.php3.24 ▲0.0134.67 ▼0.31

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by pootle button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.47 ▼0.222.39 ▲0.6839.54 ▼5.17
Dashboard /wp-admin2,209 ▲244.83 ▼0.06114.38 ▲2.8243.41 ▲1.51
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0236.76 ▲1.7931.35 ▼5.08
Add New Post /wp-admin/post-new.php1,536 ▼617.76 ▼0.37683.55 ▲35.8766.45 ▲8.57
Media Library /wp-admin/upload.php1,391 ▲94.23 ▼0.0796.33 ▼3.0543.81 ▲1.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/pootle-button/assets/dialog.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pootle-button/pootle-button.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

pootle-button/pootle-button.php Passed 13 tests

The main PHP file in "pootle button" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
58 characters long description:
A cool plugin to add delicious buttons in WordPress editor

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
No dangerous file extensions were detected865 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP23913496
JavaScript35170354
CSS13013
Markdown1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions6
▷ Named functions6100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/pbtn1.png1.67KB0.49KB▼ 70.54%
assets/icon.png1.50KB0.37KB▼ 75.34%
assets/pbtn.png1.58KB0.38KB▼ 75.90%