89% ou-social-network

Code Review | OU Social Network

WordPress plugin OU Social Network scored 89% from 54 tests.

About plugin

  • Plugin page: ou-social-network
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2016
  • Latest release: Nov 21, 2016
  • Number of updates: 6
  • Update frequency: every 2.3 days
  • Top authors: oleksandr87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.33ms] Passed 4 tests

Analyzing server-side resources used by OU Social Network
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.86 ▼2.84
Dashboard /wp-admin3.34 ▲0.0445.51 ▼1.74
Posts /wp-admin/edit.php3.39 ▲0.0450.05 ▼0.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0495.17 ▼0.14
Media Library /wp-admin/upload.php3.27 ▲0.0435.38 ▲1.95
OU Social Network /wp-admin/options-general.php?page=ou_sn_option3.2332.12

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 47 new files
Database: 4 new tables, 7 new options
New tables
wp_ousocialnetworkfriends
wp_ousocialnetworkprofile
wp_ousocialnetworwall
wp_ousocialnetworkmessage
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
jal_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for OU Social Network
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17813.66 ▼0.775.05 ▲3.2240.65 ▼3.35
Dashboard /wp-admin2,213 ▲254.89 ▼0.0398.78 ▼2.2940.25 ▼5.51
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0438.69 ▲0.6836.37 ▲4.45
Add New Post /wp-admin/post-new.php1,517 ▼1117.44 ▼0.82603.63 ▼16.5966.95 ▲3.34
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0895.49 ▼2.7342.44 ▼4.00
OU Social Network /wp-admin/options-general.php?page=ou_sn_option7842.0124.9929.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • jal_db_version
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot 3) image missing
The official readme.txt might help

ou-social-network/index.php 85% from 13 tests

The principal PHP file in "OU Social Network" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 183 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ou-social-network.php" instead of "index.php")

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 detected3,904 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP38566373,830
CSS17074

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions33
▷ Named functions33100.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
6 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png12.42KB4.95KB▼ 60.11%
images/facebook.png10.56KB3.96KB▼ 62.51%
images/twitter.png9.72KB4.36KB▼ 55.13%
screenshot-1.png53.67KB17.36KB▼ 67.65%
screenshot-3.png14.19KB5.84KB▼ 58.85%