78% themefarmer-companion

Code Review | ThemeFarmer Companion

WordPress plugin ThemeFarmer Companion scored78%from 54 tests.

About plugin

  • Plugin page: themefarmer-compa...
  • Plugin version: 1.3.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 15, 2018
  • Latest release: Sep 14, 2022
  • Number of updates: 33
  • Update frequency: every 45.2 days
  • Top authors: ThemeFarmer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

7,000+ active /169,316 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▲0.34ms] Passed 4 tests

An overview of server-side resources used by ThemeFarmer Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.27 ▲1.19
Dashboard /wp-admin3.47 ▲0.1647.96 ▼1.21
Posts /wp-admin/edit.php3.58 ▲0.2352.74 ▲8.13
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.23 ▼4.51
Media Library /wp-admin/upload.php3.39 ▲0.1638.72 ▲5.87

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 114 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ThemeFarmer Companion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,400 ▲1,66513.75 ▼0.835.83 ▲3.8643.60 ▼0.32
Dashboard /wp-admin3,697 ▲1,5094.91 ▲0.05108.54 ▼7.6536.66 ▼8.93
Posts /wp-admin/edit.php3,580 ▲1,4912.04 ▲0.0835.02 ▼4.3529.44 ▼6.09
Add New Post /wp-admin/post-new.php3,005 ▲1,49117.39 ▼0.17674.61 ▼8.7054.25 ▲3.41
Media Library /wp-admin/upload.php2,879 ▲1,4974.12 ▼0.0594.51 ▼3.8641.94 ▼0.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/themefarmer-companion/fields/repeater/inc/icons.php
    • > /wp-content/plugins/themefarmer-companion/fields/icon/inc/icons.php
  • 8× 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/themefarmer-companion/theme-files/storez-functions.php:242
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themefarmer-companion/inc/companion-customizer.php:648
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themefarmer-companion/inc/functions.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themefarmer-companion/inc/home-sections.php:218
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/themefarmer-companion/theme-files/amazica-customizer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themefarmer-companion/theme-files/scope-customizer.php:156
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themefarmer-companion/inc/class-themefarmer-menu-icon-walker.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themefarmer-companion/theme-files/newstore-functions.php:179

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: slider, team, themefarmer, testimonial, themefarmer companion

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

"ThemeFarmer Companion" version 1.3.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
117 characters long description:
Advance Extension For Theme from ThemeFarmer. enjoy full functionality of compatible theme by installing this plugin.

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin59,954 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
XML213520446,225
JavaScript171,3334795,603
PHP285354044,100
CSS18171373,341
SVG100685

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.24
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods58
▷ Static methods35.17%
▷ Public methods4679.31%
▷ Protected methods813.79%
▷ Private methods46.90%
Functions63
▷ Named functions5892.06%
▷ Anonymous functions57.94%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 1.30MB with 0.77MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
theme-files/demos/storez/images/logo.png1.75KB1.42KB▼ 19.32%
theme-files/demos/newstore/newstore-demo-2.png616.73KB174.28KB▼ 71.74%
theme-files/demos/newstore/newstore-demo-1.png712.60KB195.98KB▼ 72.50%
theme-files/demos/storez/images/logo1.png5.00KB1.42KB▼ 71.73%