83% clever-fox

Code Review | Clever Fox

WordPress plugin Clever Fox scored83%from 54 tests.

About plugin

  • Plugin page: clever-fox
  • Plugin version: 22.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 26, 2018
  • Latest release: Nov 30, 2023
  • Number of updates: 305
  • Update frequency: every 6.1 days
  • Top authors: nayrathemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60,000+ active /3,521,824 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.07MB] [CPU: ▼2.83ms] Passed 4 tests

Server-side resources used by Clever Fox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0634.25 ▼8.85
Dashboard /wp-admin3.37 ▲0.0746.60 ▼3.69
Posts /wp-admin/edit.php3.42 ▲0.0751.36 ▲2.20
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.82 ▲2.76
Media Library /wp-admin/upload.php3.30 ▲0.0733.12 ▼0.98

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 759 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
item_details_page

Browser metrics Passed 4 tests

Clever Fox: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.80 ▲0.451.61 ▼0.2636.04 ▼7.95
Dashboard /wp-admin2,235 ▲585.89 ▲0.2297.38 ▼4.8842.75 ▼3.41
Posts /wp-admin/edit.php2,139 ▲392.50 ▲0.5438.80 ▲2.4435.10 ▲0.57
Add New Post /wp-admin/post-new.php1,560 ▲3423.48 ▲0.51688.91 ▲82.9143.44 ▼13.68
Media Library /wp-admin/upload.php1,440 ▲374.56 ▲0.3796.50 ▼1.4843.31 ▼1.48

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 560× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clever-fox/inc/avril/features/avril-header.php:477
    • > PHP Fatal error
      require(): Failed opening required 'CLEVERFOX_PLUGIN_DIRinc/gradiant/extras.php' (include_path='.:/usr/share/php') in wp-content/plugins/clever-fox/inc/comoxa/comoxa.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_bits() in wp-content/plugins/clever-fox/inc/envira/default-pages/upload-media.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/clever-fox/inc/envira/default-widgets/default-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/clever-fox/inc/aravalli/sections/section-features.php:79
    • > PHP Warning
      Use of undefined constant CLEVERFOX_PLUGIN_DIR - assumed 'CLEVERFOX_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/clever-fox/inc/renoval/renoval.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/clever-fox/inc/boostify/sections/section-slider.php:106
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clever-fox/inc/conceptly/features/conceptly-info.php:319
    • > PHP Warning
      Use of undefined constant CLEVERFOX_PLUGIN_URL - assumed 'CLEVERFOX_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/clever-fox/inc/startweb/default-pages/upload-media.php on line 2
    • > PHP Warning
      require(CLEVERFOX_PLUGIN_DIRinc/fiona-blog/extras.php): failed to open stream: No such file or directory in wp-content/plugins/clever-fox/inc/fiona-food/fiona-food.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #7 (Eduvert), #8 (Aravalli), #9 (Metasoft), #10 (Boostify), #11 (Renoval)
You can take inspiration from this readme.txt

clever-fox/clever-fox.php 92% from 13 tests

Analyzing the main PHP file in "Clever Fox" version 22.2
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 470 characters long)

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
There were no executable files found in this plugin57,365 lines of code in 422 files:
LanguageFilesBlank linesComment linesLines of code
PHP3955,4253,56646,213
JavaScript151241226,819
CSS10631994,313
SVG20020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.84
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes109
▷ Abstract classes00.00%
▷ Concrete classes109100.00%
▷ Final classes00.00%
Methods136
▷ Static methods96.62%
▷ Public methods13599.26%
▷ Protected methods10.74%
▷ Private methods00.00%
Functions768
▷ Named functions768100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
182 PNG files occupy 3.51MB with 1.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/conceptly/images/partner/partner03.png5.49KB2.85KB▼ 48.05%
inc/medazin/images/elements/element4.png0.42KB0.42KB0.00%
inc/renoval/images/sponsor/sponsor-5.png46.35KB2.45KB▼ 94.72%
inc/gradiant/images/client/client01.png11.63KB4.43KB▼ 61.87%
inc/gradiant/images/service/clipArt/shape4.png2.56KB2.32KB▼ 9.60%