84% clever-fox

Code Review | Clever Fox

WordPress plugin Clever Fox scored 84% from 54 tests.

About plugin

  • Plugin page: clever-fox
  • Plugin version: 10.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Oct 26, 2018
  • Latest release: Apr 4, 2022
  • Number of updates: 151
  • Update frequency: every 8.3 days
  • Top authors: nayrathemes (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50,000+ active / 1,164,042 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Clever Fox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0268.34 ▼2.52
Dashboard /wp-admin3.43 ▲0.0239.37 ▼7.54
Posts /wp-admin/edit.php3.66 ▲0.0247.82 ▲3.69
Add New Post /wp-admin/post-new.php6.90 ▼0.07107.59 ▼1,202.61
Media Library /wp-admin/upload.php3.31 ▲0.0133.49 ▲0.72

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 466 new files
Database: no new tables, 1 new option
New WordPress options
item_details_page

Browser metrics Passed 4 tests

An overview of browser requirements for Clever Fox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,861 ▲10716.06 ▲0.5612.54 ▲1.684.07 ▲0.43
Dashboard /wp-admin2,954 ▲316.41 ▲0.06206.11 ▼0.29210.94 ▼0.26
Posts /wp-admin/edit.php2,721 ▼143.42 ▼0.0179.75 ▼14.68174.96 ▼18.08
Add New Post /wp-admin/post-new.php1,662 ▼016.11 ▼0.68613.28 ▼57.25191.69 ▼13.78
Media Library /wp-admin/upload.php1,730 ▼05.72 ▼0.01185.67 ▼11.59241.91 ▲8.93

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 1 option in the database
    • item_details_page

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 344× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/clever-fox/inc/aravalli/sections/section-room.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_bits() in wp-content/plugins/clever-fox/inc/hantus/default-pages/upload-media.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/clever-fox/inc/axtria/default-widgets/default-widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/clever-fox/inc/avril/sections/section-cta-2.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clever-fox/inc/arbuda/sections/footer-above.php:43
    • > 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/ameya/default-pages/upload-media.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clever-fox/inc/metasoft/features/metasoft-expertise.php:380
    • > PHP Warning
      require(CLEVERFOX_PLUGIN_DIRinc/gradiant/extras.php): failed to open stream: No such file or directory in wp-content/plugins/clever-fox/inc/gradiant/gradiant.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 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/envira/envira.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 96% from 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
7 plugin tags: demo, widget, sections, settings, companion...

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

The main file in "Clever Fox" v. 10.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 309 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected34,467 lines of code in 269 files:
LanguageFilesBlank linesComment linesLines of code
PHP2503,2692,24629,790
JavaScript1064672,460
CSS7387422,197
SVG20020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.08
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes00.00%
Methods72
▷ Static methods45.56%
▷ Public methods7198.61%
▷ Protected methods11.39%
▷ Private methods00.00%
Functions469
▷ Named functions469100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
114 PNG files occupy 1.94MB with 0.82MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/belltech/images/footer-logo.png3.26KB2.40KB▼ 26.57%
inc/azwa/images/shape/shape12.png46.13KB4.81KB▼ 89.57%
inc/startkit/images/testimonial/testimonial02.png11.04KB4.58KB▼ 58.54%
inc/azwa/images/shape/shape15.png6.90KB8.09KB0.00%
inc/aravalli/images/logo.png8.14KB5.21KB▼ 36.01%