84% socmen

Code Review | SOCMEN

WordPress plugin SOCMEN scored84%from 54 tests.

About plugin

  • Plugin page: socmen
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 13, 2015
  • Latest release: Jun 3, 2018
  • Number of updates: 26
  • Update frequency: every 41.8 days
  • Top authors: webmaric (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,281 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by SOCMEN
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0846.79 ▲4.91
Dashboard /wp-admin3.40 ▲0.0949.03 ▼4.59
Posts /wp-admin/edit.php3.45 ▲0.0947.94 ▼3.97
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.74 ▼16.58
Media Library /wp-admin/upload.php3.32 ▲0.0936.85 ▼4.55

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by SOCMEN
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.44 ▼0.9111.66 ▲9.6236.54 ▼8.81
Dashboard /wp-admin2,212 ▲385.56 ▼0.0090.25 ▼9.9867.96 ▲22.93
Posts /wp-admin/edit.php2,117 ▲201.99 ▲0.0436.91 ▼2.0334.14 ▲0.53
Add New Post /wp-admin/post-new.php1,542 ▲1622.97 ▼0.60705.12 ▲42.9773.11 ▲17.71
Media Library /wp-admin/upload.php1,411 ▲144.15 ▼0.05103.94 ▼1.4068.51 ▲26.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/socmen/zmen.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
The official readme.txt might help

socmen/zmen.php 92% from 13 tests

The main PHP script in "SOCMEN" version 2.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("socmen.php" instead of "zmen.php")

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
Everything looks great! No dangerous files found in this plugin502 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31212452
CSS20050

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions9
▷ Named functions9100.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
28 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ld.png3.50KB0.75KB▼ 78.59%
images/wordpress.png3.82KB2.31KB▼ 39.45%
images/youtube.png1.88KB1.87KB▼ 0.62%
images/rss.png2.78KB2.01KB▼ 27.44%
images/behance.png3.44KB2.17KB▼ 36.91%