73% revivify-social

Code Review | ReVivify Social

WordPress plugin ReVivify Social scored 73% from 54 tests.

About plugin

  • Plugin page: revivify-social
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5
  • WordPress version: 6.3.1
  • First release: Sep 30, 2020
  • Latest release: Oct 1, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: synextech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 374 total downloads

Benchmarks

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

Server metrics [RAM: ▼0.91MB] [CPU: ▼22.92ms] Passed 4 tests

A check of server-side resources used by ReVivify Social
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.84 ▼34.37
Dashboard /wp-admin3.47 ▲0.1752.95 ▲2.70
Posts /wp-admin/edit.php3.52 ▲0.1749.46 ▼1.19
Add New Post /wp-admin/post-new.php3.34 ▼2.5439.45 ▼58.81
Media Library /wp-admin/upload.php3.40 ▲0.1744.02 ▲6.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 109 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ReVivify Social
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲25415.17 ▲0.7310.29 ▲8.4330.14 ▼20.33
Dashboard /wp-admin2,262 ▲715.81 ▼0.09105.72 ▼5.8379.97 ▲37.79
Posts /wp-admin/edit.php2,145 ▲532.62 ▲0.5841.13 ▼0.1632.82 ▼1.49
Add New Post /wp-admin/post-new.php6,715 ▲5,20125.55 ▲7.931,000.90 ▲310.1842.13 ▼18.78
Media Library /wp-admin/upload.php1,501 ▲1135.04 ▲0.82123.24 ▲17.8651.57 ▲0.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/revivify-social/wp-revivify-social.php+112
    Undefined variable: timestamp
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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 | 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 fix the following
  • 45× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/revivify-social/Facebook/Exceptions/FacebookThrottleException.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/revivify-social/Facebook/Helpers/FacebookCanvasHelper.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\HttpClients\\FacebookHttpClientInterface' not found in wp-content/plugins/revivify-social/Facebook/HttpClients/FacebookCurlHttpClient.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/revivify-social/Facebook/GraphNodes/GraphAlbum.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/revivify-social/Facebook/GraphNodes/GraphApplication.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PseudoRandomString\\PseudoRandomStringGeneratorInterface' not found in wp-content/plugins/revivify-social/Facebook/PseudoRandomString/RandomBytesPseudoRandomStringGenerator.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PersistentData\\PersistentDataInterface' not found in wp-content/plugins/revivify-social/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/revivify-social/Facebook/Exceptions/FacebookResumableUploadException.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\FacebookRequest' not found in wp-content/plugins/revivify-social/Facebook/FacebookBatchRequest.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/revivify-social/twitteroauth/src/HmacSha1.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

revivify-social/wp-revivify-social.php 92% from 13 tests

The principal PHP file in "ReVivify Social" v. 1.0.0 is loaded by WordPress automatically on each request
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 ("revivify-social.php" instead of "wp-revivify-social.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected9,176 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP891,3666,2637,039
CSS3197171,194
JavaScript315334810
Markdown434069
JSON10034
YAML10017
XML11113

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 150)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.30
▷ Minimum class complexity1.00
▷ Maximum class complexity315.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity150.00
Code structure
Namespaces13
Interfaces5
Traits1
Classes80
▷ Abstract classes22.50%
▷ Concrete classes7897.50%
▷ Final classes00.00%
Methods613
▷ Static methods254.08%
▷ Public methods55390.21%
▷ Protected methods264.24%
▷ Private methods345.55%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants28
▷ Global constants310.71%
▷ Class constants2589.29%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/revivify_logo_synex_social_share.png37.39KB4.62KB▼ 87.66%
images/re-icon.png0.45KB0.30KB▼ 32.89%