74% social-charts

Code Review | Social Charts

WordPress plugin Social Charts scored74%from 54 tests.

About plugin

  • Plugin page: social-charts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Jun 16, 2020
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: protectyouruploads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /424 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Social Charts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.70 ▼8.41
Dashboard /wp-admin3.32 ▲0.0247.83 ▼2.35
Posts /wp-admin/edit.php3.37 ▲0.0147.77 ▲3.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.73 ▼2.72
Media Library /wp-admin/upload.php3.24 ▲0.0132.77 ▼5.44

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 34 new files
Database: 2 new tables, 7 new options
New tables
wp_sc_data
wp_sc_platforms
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
sc_settings

Browser metrics Passed 4 tests

A check of browser resources used by Social Charts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.64 ▼0.654.78 ▲2.9838.84 ▼6.37
Dashboard /wp-admin2,227 ▲364.84 ▼0.0397.27 ▼18.4542.17 ▼2.08
Posts /wp-admin/edit.php2,110 ▲212.01 ▼0.0339.80 ▲2.9934.10 ▲1.14
Add New Post /wp-admin/post-new.php1,553 ▲3918.09 ▲0.67595.25 ▼84.8361.23 ▼8.93
Media Library /wp-admin/upload.php1,406 ▲214.22 ▲0.0294.49 ▼4.9942.21 ▲0.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_sc_data
    • wp_sc_platforms
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • sc_settings
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/social-charts/public/partials/social-charts-public-display.php
    • > /wp-content/plugins/social-charts/admin/partials/social-charts-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: social-media, social-counter, monitoring, charts, instagram

social-charts/social-charts.php Passed 13 tests

"Social Charts" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
76 characters long description:
Monitor and show your social media follower development as a beautiful chart

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 detected486 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP15205550478
JavaScript42356
CSS3332

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.15
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.26
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin