88% social-mentions

Code Review | Social Mentions

WordPress plugin Social Mentions scored 88% from 54 tests.

About plugin

  • Plugin page: social-mentions
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8.1
  • WordPress version: 5.9.2
  • First release: Aug 15, 2017
  • Latest release: Sep 1, 2017
  • Number of updates: 9
  • Update frequency: every 1.9 days
  • Top authors: xkon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 930 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼288.55ms] Passed 4 tests

An overview of server-side resources used by Social Mentions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3156.79 ▲5.78
Dashboard /wp-admin3.68 ▲0.2735.17 ▲1.66
Posts /wp-admin/edit.php3.91 ▲0.2638.80 ▲1.67
Add New Post /wp-admin/post-new.php7.16 ▲0.1893.27 ▼1,160.78
Media Library /wp-admin/upload.php3.57 ▲0.2728.48 ▲3.26
Google+ Feed /wp-admin/edit.php?post_type=socment-googleplus3.6729.18
Flickr Feed /wp-admin/edit.php?post_type=socment-flickr3.6726.17
Hashtags /wp-admin/edit-tags.php?taxonomy=socment-hashtags3.5626.39
Instagram Feed /wp-admin/edit.php?post_type=socment-instagram3.6727.50
Settings /wp-admin/admin.php?page=social-mentions-settings3.5124.53
Twitter Feed /wp-admin/edit.php?post_type=socment-twitter3.6725.68

Server storage [IO: ▲1.35MB] [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: 55 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Social Mentions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,880 ▲15816.21 ▲0.466.31 ▼0.452.50 ▲0.38
Dashboard /wp-admin2,961 ▲1006.17 ▼0.01118.39 ▼17.86155.51 ▼6.02
Posts /wp-admin/edit.php2,760 ▲663.24 ▲0.0064.11 ▲2.04136.03 ▼0.61
Add New Post /wp-admin/post-new.php1,763 ▲6717.56 ▼3.51399.53 ▼63.12153.32 ▼1.99
Media Library /wp-admin/upload.php1,764 ▲635.53 ▲0.08146.45 ▲5.75188.44 ▲2.90
Google+ Feed /wp-admin/edit.php?post_type=socment-googleplus1,4403.1669.75125.13
Flickr Feed /wp-admin/edit.php?post_type=socment-flickr1,4453.1761.29111.84
Hashtags /wp-admin/edit-tags.php?taxonomy=socment-hashtags1,6562.7956.59116.44
Instagram Feed /wp-admin/edit.php?post_type=socment-instagram1,4423.1659.74116.40
Settings /wp-admin/admin.php?page=social-mentions-settings1,5642.4053.53125.62
Twitter Feed /wp-admin/edit.php?post_type=socment-twitter1,4452.9259.57113.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=social-mentions-settings
    • > Notice in wp-content/plugins/social-mentions/settings/options.php+343
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 7× 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/social-mentions/settings/options.php:180
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/social-mentions/settings/shortcode.php:144
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-mentions/settings/create-user.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-mentions/settings/admin-menus.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-mentions/settings/meta-boxes.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-mentions/settings/custom-posts.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-mentions/settings/cron.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: flickr, google, google plus, social media, hashtag...

social-mentions/social-mentions.php 92% from 13 tests

Analyzing the main PHP file in "Social Mentions" version 1.0.3
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected9,887 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS312132,407
Sass1434341,768
LESS1434441,758
PHP131481041,281
JavaScript22122

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
No PNG images were found in this plugin