84% jfa-social-media-post

Code Review | Jfa Social Media Post

WordPress plugin Jfa Social Media Post scored84%from 54 tests.

About plugin

  • Plugin page: jfa-social-media-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 6.3.1
  • First release: Sep 22, 2021
  • Latest release: Sep 23, 2021
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: jfadev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.66MB] [CPU: ▼18.46ms] Passed 4 tests

Server-side resources used by Jfa Social Media Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.71 ▼9.34
Dashboard /wp-admin3.33 ▲0.0248.81 ▼4.99
Posts /wp-admin/edit.php3.38 ▲0.0251.13 ▼1.31
Add New Post /wp-admin/post-new.php3.20 ▼2.6834.10 ▼58.20
Media Library /wp-admin/upload.php3.25 ▲0.0239.90 ▲5.21

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Jfa Social Media Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.59 ▼0.721.89 ▼0.3039.53 ▼2.65
Dashboard /wp-admin2,222 ▲345.83 ▼0.04111.09 ▼1.3541.74 ▲0.30
Posts /wp-admin/edit.php2,105 ▲132.04 ▲0.0435.38 ▼1.2233.33 ▼0.38
Add New Post /wp-admin/post-new.php1,532 ▲1323.10 ▼0.06639.60 ▲3.1149.75 ▼3.01
Media Library /wp-admin/upload.php1,401 ▲134.20 ▲0.0297.36 ▼4.5341.61 ▼6.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 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/jfa-social-media-post/jfa-social-media-post.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: social media, instagram

jfa-social-media-post/jfa-social-media-post.php Passed 13 tests

The main file in "Jfa Social Media Post" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
103 characters long description:
This WordPress plugin allows you to retrieve a specific Instagram post and consume it via the REST API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin127 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1920127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin