84% my-social-media

Code Review | My Social Media

WordPress plugin My Social Media scored 84% from 54 tests.

About plugin

  • Plugin page: my-social-media
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.7
  • WordPress version: 5.8.1
  • First release: Apr 14, 2021
  • Latest release: Apr 14, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: abdulhadicse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 88 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼138.60ms] Passed 4 tests

Server-side resources used by My Social Media
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.82 ▲12.48
Dashboard /wp-admin3.07 ▲0.0147.74 ▲4.59
Posts /wp-admin/edit.php3.12 ▲0.0149.03 ▲3.13
Add New Post /wp-admin/post-new.php5.43 ▼0.0188.95 ▼559.74
Media Library /wp-admin/upload.php3.01 ▲0.0131.02 ▼2.37

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 2 new options
New WordPress options
msm_my_social_media_install
msm_my_social_media_version

Browser metrics Passed 4 tests

My Social Media: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲12915.92 ▲0.3613.43 ▲4.7251.24 ▼2.88
Dashboard /wp-admin2,987 ▲535.94 ▼0.01166.91 ▲17.76134.75 ▲17.09
Posts /wp-admin/edit.php2,756 ▲172.70 ▲0.0173.74 ▲4.1995.41 ▲0.68
Add New Post /wp-admin/post-new.php1,696 ▲11518.79 ▲1.28384.75 ▼90.37111.71 ▼20.06
Media Library /wp-admin/upload.php1,768 ▼394.98 ▼0.04159.25 ▲0.96124.56 ▲1.77

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
These items require your attention
  • The uninstall procedure has failed, leaving 2 options in the database
    • msm_my_social_media_install
    • msm_my_social_media_version

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 no errors were found, this is by no means 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_avatar() in wp-content/plugins/my-social-media/assets/views/admin-view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/my-social-media/assets/views/admin-info.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: facebook, social sharing, twitter, share buttons, linkedin...

my-social-media/my-social-media.php 92% from 13 tests

The main PHP script in "My Social Media" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin317 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP446152271
CSS18042
JavaScript1104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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.07MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png31.78KB15.37KB▼ 51.62%
screenshot-1.png37.70KB19.59KB▼ 48.05%