78% we-client-logo-carousel

Code Review | WE - Client Logo Carousel

WordPress plugin WE - Client Logo Carousel scored78%from 54 tests.

About plugin

  • Plugin page: we-client-logo-ca...
  • Plugin version: 1.4
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 27, 2018
  • Latest release: Jul 6, 2023
  • Number of updates: 40
  • Update frequency: every 42.1 days
  • Top authors: wordpresteem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /989 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.01ms] Passed 4 tests

An overview of server-side resources used by WE - Client Logo Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0942.68 ▲1.04
Dashboard /wp-admin3.41 ▲0.0651.92 ▼20.52
Posts /wp-admin/edit.php3.46 ▲0.1051.75 ▼0.01
Add New Post /wp-admin/post-new.php5.99 ▲0.1095.87 ▼8.55
Media Library /wp-admin/upload.php3.33 ▲0.1038.49 ▲3.80
Add New Client Logo /wp-admin/post-new.php?post_type=we-client-logo3.4151.81
Carousel Category /wp-admin/edit-tags.php?taxonomy=carousel_cat&post_type=we-client-logo3.3237.14
WE Client Logo /wp-admin/edit.php?post_type=we-client-logo3.3336.09
WE Client Logo Carousel Settings /wp-admin/edit.php?post_type=we-client-logo&page=logo-client-carousel3.3034.62

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WE - Client Logo Carousel
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8214.39 ▼0.201.85 ▲0.0144.60 ▲2.54
Dashboard /wp-admin2,243 ▲695.62 ▲0.0586.38 ▼3.8041.26 ▼0.44
Posts /wp-admin/edit.php2,151 ▲481.96 ▼0.0139.38 ▲0.2339.48 ▲1.42
Add New Post /wp-admin/post-new.php1,568 ▲4223.42 ▲0.31689.33 ▼31.1354.04 ▲5.06
Media Library /wp-admin/upload.php1,451 ▲514.19 ▲0.0295.75 ▼3.4745.67 ▼0.90
Add New Client Logo /wp-admin/post-new.php?post_type=we-client-logo1,8093.7569.9435.29
Carousel Category /wp-admin/edit-tags.php?taxonomy=carousel_cat&post_type=we-client-logo1,3222.1226.0530.56
WE Client Logo /wp-admin/edit.php?post_type=we-client-logo1,1231.9729.8732.39
WE Client Logo Carousel Settings /wp-admin/edit.php?post_type=we-client-logo&page=logo-client-carousel9732.0024.7029.40

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • weclient_slider_settings
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=we-client-logo
    • > Notice in wp-content/plugins/we-client-logo-carousel/we-client-logo-carousel.php+79
    Trying to get property 'post_type' of non-object

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/we-client-logo-carousel/includes/we-client-logo-carousel-settings.php:10

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

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

we-client-logo-carousel/we-client-logo-carousel.php Passed 13 tests

Analyzing the main PHP file in "WE - Client Logo Carousel" version 1.4
137 characters long description:
Display client's logo, partner's logo, sponsor's logos or images using We-client-logo-carousel plugin in beautiful and responsive manner.

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 detected2,539 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3828452,033
PHP46037309
CSS120197

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/placeholder.png9.67KB4.11KB▼ 57.45%
images/right.png2.30KB0.88KB▼ 61.82%
images/left.png2.29KB0.88KB▼ 61.58%