90% coub

Code Review | Coub

WordPress plugin Coub scored90%from 54 tests.

About plugin

  • Plugin page: coub
  • Plugin version: 1.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: Apr 16, 2015
  • Latest release: Feb 3, 2018
  • Number of updates: 25
  • Update frequency: every 41.0 days
  • Top authors: ramiy (88%)Coub (16%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Coub
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.09 ▼3.33
Dashboard /wp-admin3.32 ▲0.0245.92 ▼2.48
Posts /wp-admin/edit.php3.37 ▲0.0246.57 ▼2.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.05 ▼5.84
Media Library /wp-admin/upload.php3.25 ▲0.0236.15 ▲3.30

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

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

Browser metrics Passed 4 tests

Coub: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼1.051.69 ▼0.1239.89 ▼1.29
Dashboard /wp-admin2,203 ▲185.84 ▼0.0798.63 ▼3.7041.22 ▼1.89
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0439.83 ▼0.5534.23 ▼1.38
Add New Post /wp-admin/post-new.php1,542 ▲2218.24 ▼4.84595.71 ▼76.3151.93 ▼7.16
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0397.68 ▼1.2040.94 ▼6.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: videos, oembed, embed, shortcode, coub

coub/coub.php Passed 13 tests

The principal PHP file in "Coub" v. 1.4 is loaded by WordPress automatically on each request
70 characters long description:
Embed looped videos with audio from coub.com into your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected72 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5447172

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
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.34MB with 0.23MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png320.50KB95.57KB▼ 70.18%
screenshot-1.png24.47KB7.75KB▼ 68.30%