83% fashe-companion

Code Review | Fashe Companion

WordPress plugin Fashe Companion scored83%from 54 tests.

About plugin

  • Plugin page: fashe-companion
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2019
  • Latest release: Feb 15, 2019
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: machothemes (60%)colorlibplugins (60%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,180 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Fashe Companion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.77 ▲4.16
Dashboard /wp-admin3.31 ▲0.0150.52 ▼5.35
Posts /wp-admin/edit.php3.36 ▲0.0151.26 ▼4.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.06 ▼15.95
Media Library /wp-admin/upload.php3.23 ▲0.0138.49 ▲1.92

Server storage [IO: ▲1.25MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/fashe-companion/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Fashe Companion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6513.26 ▼1.324.39 ▲2.8444.32 ▲1.47
Dashboard /wp-admin2,232 ▲295.79 ▲0.88110.03 ▲4.3439.33 ▼4.35
Posts /wp-admin/edit.php2,112 ▲122.00 ▲0.0139.41 ▲1.5134.84 ▲0.94
Add New Post /wp-admin/post-new.php1,537 ▲617.58 ▼5.61689.13 ▼0.9364.12 ▲2.23
Media Library /wp-admin/upload.php1,405 ▲84.19 ▲0.0299.80 ▼9.8742.77 ▼4.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fashe-companion/inc/sidebar-widgets/newsletter-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === fashe-companion === )
You can take inspiration from this readme.txt

fashe-companion/fashe-companion.php Passed 13 tests

The principal PHP file in "Fashe Companion" v. 1.2 is loaded by WordPress automatically on each request
47 characters long description:
Fashe Companion is a companion for Fashe theme.

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
No dangerous file extensions were detected11,195 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
XML164645,956
PHP196876013,465
CSS51821,211
SVG100362
JavaScript66615200
JSON1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.29
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods99
▷ Static methods44.04%
▷ Public methods7272.73%
▷ Protected methods2424.24%
▷ Private methods33.03%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.14MB with 0.12MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/fashe-meta/assets/img/thumb_03.png1.13KB0.13KB▼ 88.71%
inc/fashe-meta/assets/img/thumb_02.png1.13KB0.14KB▼ 87.68%
inc/demo-data/screen-image.png142.76KB53.60KB▼ 62.46%
inc/fashe-meta/assets/img/thumb_01.png1.12KB0.13KB▼ 88.27%