78% viralism

Code Review | Viralism

WordPress plugin Viralism scored78%from 54 tests.

About plugin

  • Plugin page: viralism
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8
  • WordPress version: 6.3.1
  • First release: Jun 6, 2017
  • Latest release: Jun 6, 2017
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: chatthasumit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,105 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
Install script ran successfully

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

This is a short check of server-side resources used by Viralism
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.55 ▼6.74
Dashboard /wp-admin3.34 ▼0.0051.97 ▼16.72
Posts /wp-admin/edit.php3.39 ▲0.0347.80 ▼8.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.49 ▼19.21
Media Library /wp-admin/upload.php3.26 ▲0.0342.79 ▲2.62

Server storage [IO: ▲2.11MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 65 new files
Database: 4 new tables, 6 new options
New tables
wp_vio_pinterest
wp_vio_content
wp_vio_content_social
wp_vio_twitter
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Viralism
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7413.49 ▼0.782.57 ▲0.8343.55 ▲3.23
Dashboard /wp-admin2,241 ▲616.03 ▲0.4290.52 ▼4.7137.72 ▼3.44
Posts /wp-admin/edit.php2,149 ▲492.60 ▲0.5734.92 ▼0.6334.90 ▼0.68
Add New Post /wp-admin/post-new.php1,723 ▲19722.88 ▼0.51792.43 ▲95.9650.92 ▼2.54
Media Library /wp-admin/upload.php1,437 ▲374.62 ▲0.44101.10 ▼1.6476.02 ▲29.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/viralism/inc/footer.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/viralism/index.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Dashboard), #2 (Social Accounts), #3 (Trending Search), #4 (Error Log), #5 (Upgrade Plugin)
You can take inspiration from this readme.txt

viralism/index.php 85% from 13 tests

The main file in "Viralism" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("viralism.php" instead of "index.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected16,459 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
SVG30010,217
CSS7274875,481
JavaScript81847519
PHP8710242

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/index.png0.50KB0.42KB▼ 15.92%
images/1default_twitter.png8.25KB2.55KB▼ 69.12%
images/--default_facebook.png4.32KB1.09KB▼ 74.77%
images/br_down.png3.14KB0.32KB▼ 89.74%
images/computer-index.png3.62KB1.15KB▼ 68.22%