10% maven-algolia

Code Review | Maven Algolia

WordPress plugin Maven Algolia scored10%from 54 tests.

About plugin

  • Plugin page: maven-algolia
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.9
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: Jul 8, 2014
  • Number of updates: 8
  • Update frequency: every 6.6 days
  • Top authors: mustela (87.5%)gtenaschuk (25%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10,000+ active /1,802 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/maven-algolia/core/utils.php+26
    preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.77ms] Passed 4 tests

This is a short check of server-side resources used by Maven Algolia
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.96 ▼7.80
Dashboard /wp-admin3.31 ▲0.0049.25 ▼4.92
Posts /wp-admin/edit.php3.36 ▲0.0053.26 ▼0.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.54 ▼16.64
Media Library /wp-admin/upload.php3.23 ▲0.0036.36 ▼1.70

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Maven Algolia
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.63 ▲0.462.23 ▲0.3651.77 ▲6.83
Dashboard /wp-admin2,195 ▲155.56 ▼0.1384.95 ▼11.1538.75 ▼3.81
Posts /wp-admin/edit.php2,103 ▲32.06 ▲0.0339.89 ▲4.0937.43 ▲1.33
Add New Post /wp-admin/post-new.php1,549 ▲923.34 ▲5.13647.44 ▲16.3753.48 ▲0.42
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.02101.30 ▼3.6744.09 ▼3.69

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'MavenAlgolia\\Core\\Registry' not found in wp-content/plugins/maven-algolia/admin/views/settings.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Suggestive Search), #2 (A graphical interface to manage your settings)
Please take inspiration from this readme.txt

maven-algolia/maven-algolia.php Passed 13 tests

Analyzing the main PHP file in "Maven Algolia" version 0.4
57 characters long description:
Fully customise WordPress search implementing algolia API

Code Analysis 5% from 3 tests

File types 0% from 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
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/maven-algolia/lib/resources/ca-bundle.crt
3,683 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP186441,0732,656
JavaScript34069570
CSS24278457

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.60
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods238
▷ Static methods4619.33%
▷ Public methods23397.90%
▷ Protected methods10.42%
▷ Private methods41.68%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants14
▷ Global constants214.29%
▷ Class constants1285.71%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.42MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png57.00KB21.08KB▼ 63.01%
admin/assets/styles/images/ui-bg_flat_55_fbec88_40x100.png0.20KB0.08KB▼ 57.77%
admin/assets/styles/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png5.69KB2.08KB▼ 63.46%
admin/assets/images/icon.png3.89KB0.88KB▼ 77.49%
admin/assets/styles/images/ui-bg_inset-hard_100_fcfdfd_1x100.png0.29KB0.10KB▼ 65.41%