84% fx-share

Code Review | f(x) Share

WordPress plugin f(x) Share scored84%from 54 tests.

About plugin

  • Plugin page: fx-share
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Jan 8, 2016
  • Latest release: Aug 1, 2016
  • Number of updates: 9
  • Update frequency: every 37.3 days
  • Top authors: turtlepod (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.87ms] Passed 4 tests

An overview of server-side resources used by f(x) Share
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.88 ▼2.12
Dashboard /wp-admin3.36 ▲0.0544.75 ▼4.87
Posts /wp-admin/edit.php3.41 ▲0.0544.27 ▼2.46
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.31 ▲2.22
Media Library /wp-admin/upload.php3.28 ▲0.0533.73 ▲1.98

Server storage [IO: ▲0.05MB] [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: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for f(x) Share
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.071.69 ▲0.1842.85 ▲3.67
Dashboard /wp-admin2,192 ▲155.57 ▼0.0582.38 ▼5.2239.66 ▼3.36
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0139.09 ▲2.2734.71 ▲1.55
Add New Post /wp-admin/post-new.php1,526 ▼223.16 ▲0.02666.42 ▼11.6262.61 ▲3.57
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.13104.04 ▲5.8946.49 ▼2.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fx-share/includes/setup.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/fx-share/includes/customizer-controls.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fx-share/includes/customizer.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/fx-share/fx-share.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: spam, comments

fx-share/fx-share.php Passed 13 tests

This is the main PHP file of "f(x) Share" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
94 characters long description:
Simple sharing plugin. Easily add Facebook, Twitter, and Google+ share button to your content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin576 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP6145214426
CSS371113
JavaScript111925
SVG11012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.00
▷ Minimum class complexity7.00
▷ Maximum class complexity11.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin