84% imod-social

Code Review | WordPress Social

WordPress plugin WordPress Social scored84%from 54 tests.

About plugin

  • Plugin page: imod-social
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.6
  • WordPress version: 6.3.1
  • First release: Oct 12, 2016
  • Latest release: Nov 12, 2016
  • Number of updates: 9
  • Update frequency: every 3.6 days
  • Top authors: christopherimod (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /877 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.70ms] Passed 4 tests

A check of server-side resources used by WordPress Social
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.88 ▼4.58
Dashboard /wp-admin3.40 ▲0.1054.28 ▲7.12
Posts /wp-admin/edit.php3.52 ▲0.1647.89 ▲2.64
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.73 ▼8.06
Media Library /wp-admin/upload.php3.32 ▲0.0936.76 ▲3.22
Settings /wp-admin/admin.php?page=wp-social3.2931.25
About /wp-admin/admin.php?page=about3.2932.32
Export /wp-admin/admin.php?page=export3.2927.31

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Social
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲12913.40 ▼1.212.18 ▲0.3244.49 ▲3.64
Dashboard /wp-admin2,257 ▲695.83 ▼0.0799.09 ▼8.6840.35 ▼2.35
Posts /wp-admin/edit.php2,171 ▲822.02 ▼0.0037.67 ▲4.5034.02 ▼1.76
Add New Post /wp-admin/post-new.php1,559 ▲4023.19 ▲0.02681.34 ▼24.4573.94 ▲15.18
Media Library /wp-admin/upload.php1,436 ▲514.23 ▼0.0797.35 ▼9.3740.91 ▼1.86
Settings /wp-admin/admin.php?page=wp-social9212.0629.2530.71
About /wp-admin/admin.php?page=about8512.1928.3025.57
Export /wp-admin/admin.php?page=export9012.2023.8723.01

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

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

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/imod-social/views/sidebar.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/imod-social/wordpress-social.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

imod-social/wordpress-social.php 92% from 13 tests

The main file in "WordPress Social" v. 1.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: Name the main plugin file the same as the plugin slug ("imod-social.php" instead of "wordpress-social.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin592 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP77716564
CSS16028

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.31MB with 0.20MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/example.png55.03KB25.34KB▼ 53.95%
assets/screenshot-2.png131.92KB41.92KB▼ 68.23%
assets/screenshot-1.png129.40KB39.54KB▼ 69.44%