100% pastebin-embed

Code Review | Pastebin

WordPress plugin Pastebin scored 100% from 54 tests.

About plugin

  • Plugin page: pastebin-embed
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 5.8.1
  • First release: Mar 6, 2015
  • Latest release: Feb 3, 2018
  • Number of updates: 24
  • Update frequency: every 44.4 days
  • Top authors: ramiy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 6,962 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼140.92ms] Passed 4 tests

Server-side resources used by Pastebin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0033.00 ▼1.47
Dashboard /wp-admin3.06 ▲0.0146.30 ▲0.85
Posts /wp-admin/edit.php3.11 ▲0.0147.61 ▲0.36
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.04 ▼563.40
Media Library /wp-admin/upload.php3.00 ▲0.0033.21 ▲3.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Pastebin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9316.16 ▲0.498.02 ▼2.9949.61 ▼0.81
Dashboard /wp-admin2,970 ▲396.01 ▲0.01144.36 ▼2.92110.03 ▲4.65
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0070.25 ▼3.0985.89 ▲1.50
Add New Post /wp-admin/post-new.php3,687 ▲2,18715.11 ▼3.40485.23 ▲21.51110.22 ▲3.37
Media Library /wp-admin/upload.php1,810 ▼05.03 ▲0.01165.94 ▲16.16113.55 ▼1.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: shortcode, snippets, embed, bin, paste...

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

The main file in "Pastebin" v. 1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
56 characters long description:
Embed pastes from pastebin.com into your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin53 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5316753

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png49.92KB16.62KB▼ 66.71%
screenshot-1.png16.70KB6.98KB▼ 58.17%