84% editor-file-search

Code Review | Theme and Plugin file Search

WordPress plugin Theme and Plugin file Search scored84%from 54 tests.

About plugin

  • Plugin page: editor-file-search
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Oct 31, 2017
  • Latest release: Jun 23, 2019
  • Number of updates: 14
  • Update frequency: every 42.9 days
  • Top authors: Mahesh901122 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,244 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Theme and Plugin file Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.80 ▼1.47
Dashboard /wp-admin3.32 ▲0.0151.41 ▼1.55
Posts /wp-admin/edit.php3.37 ▲0.0150.95 ▼2.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.04 ▼17.71
Media Library /wp-admin/upload.php3.24 ▲0.0136.73 ▼0.16

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Theme and Plugin file Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.081.65 ▼1.0737.93 ▼9.04
Dashboard /wp-admin2,198 ▲185.57 ▼0.1188.59 ▼1.3239.66 ▼6.56
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0439.34 ▲0.8636.16 ▼1.07
Add New Post /wp-admin/post-new.php1,526 ▼023.71 ▲0.13694.88 ▲27.7162.37 ▲13.91
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0297.81 ▼12.1541.90 ▼4.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Everything seems fine, however this is by no means 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/editor-file-search/classes/class-editor-file-search.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/editor-file-search/editor-file-search.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: The official readme.txt is a good inspiration

editor-file-search/editor-file-search.php Passed 13 tests

This is the main PHP file of "Theme and Plugin file Search" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
58 characters long description:
Add the search filed in theme & plugin file editor window.

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 detected110 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2176154
JavaScript1182547
CSS1005
Markdown1304

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin