77% ls-wp-ccsearch

Code Review | Easy search and use CC-licensed images for WP

WordPress plugin Easy search and use CC-licensed images for WP scored77%from 54 tests.

About plugin

  • Plugin page: ls-wp-ccsearch
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Aug 5, 2019
  • Latest release: Oct 20, 2022
  • Number of updates: 21
  • Update frequency: every 55.9 days
  • Top authors: lenasterg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Easy search and use CC-licensed images for WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0934.89 ▼4.96
Dashboard /wp-admin3.40 ▲0.0945.19 ▼7.77
Posts /wp-admin/edit.php3.45 ▲0.0948.74 ▲0.96
Add New Post /wp-admin/post-new.php6.00 ▲0.1189.13 ▼8.00
Media Library /wp-admin/upload.php3.32 ▲0.0936.05 ▲0.35
Easy search and use CC-licensed images for WP /wp-admin/admin.php?page=lswpccsearch-wpcc3.2931.27

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy search and use CC-licensed images for WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲33113.33 ▼1.101.69 ▼0.1238.81 ▼5.25
Dashboard /wp-admin2,486 ▲3045.00 ▲0.02109.44 ▼15.6442.01 ▼13.96
Posts /wp-admin/edit.php2,613 ▲5212.36 ▲0.3549.64 ▲8.4136.02 ▲2.64
Add New Post /wp-admin/post-new.php1,971 ▲43823.59 ▲0.50647.00 ▲34.7333.78 ▼18.54
Media Library /wp-admin/upload.php1,912 ▲5274.51 ▲0.33105.51 ▲4.8441.93 ▼1.83
Easy search and use CC-licensed images for WP /wp-admin/admin.php?page=lswpccsearch-wpcc1,3501.9736.2123.25

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× 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/ls-wp-ccsearch/ls-wp-ccsearch-pointer.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=lswpccsearch-wpcc
    • > Network (severe)
    wp-content/plugins/ls-wp-ccsearch/assets/images/how-01.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=lswpccsearch-wpcc
    • > Network (severe)
    wp-content/plugins/ls-wp-ccsearch/assets/images/how-02.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=lswpccsearch-wpcc
    • > Network (severe)
    wp-content/plugins/ls-wp-ccsearch/assets/images/how-03.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: These screenshots do not have images: #1 (The "Image with CC license" button on editor), #2 (Search for an image), #3 (Preview of an image and its license.), #4 (Image settings: use of thumbnail or original image, set the image link (if any). Insert the image into the post or as featured image.), #5 (The image and it's license into the editor), #6 (The published post with the image.)
Please take inspiration from this readme.txt

ls-wp-ccsearch/index.php 85% from 13 tests

The main file in "Easy search and use CC-licensed images for WP" v. 3.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ls-wp-ccsearch.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,478 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42771541,201
CSS313122700
PHP25769363
PO File14450128
Markdown127086

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
7 PNG files occupy 2.68MB with 1.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cc-search-logo-white.png14.71KB7.24KB▼ 50.79%
screenshot-5.png679.10KB173.80KB▼ 74.41%
screenshot-2.png626.03KB164.03KB▼ 73.80%
screenshot-4.png536.82KB135.96KB▼ 74.67%
assets/images/controls.png1.59KB1.67KB0.00%