94% remove-pages-from-search

Code Review | Remove Pages From Search

WordPress plugin Remove Pages From Search scored 94% from 54 tests.

About plugin

  • Plugin page: remove-pages-from...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: Mar 26, 2019
  • Latest release: Mar 3, 2021
  • Number of updates: 9
  • Update frequency: every 79.0 days
  • Top authors: gkouvousisg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 398 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by Remove Pages From Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.14 ▲11.94
Dashboard /wp-admin3.06 ▲0.0144.01 ▼4.41
Posts /wp-admin/edit.php3.11 ▲0.0136.03 ▼8.69
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.96 ▼564.89
Media Library /wp-admin/upload.php3.00 ▲0.0035.49 ▼0.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Remove Pages From Search: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.83 ▲0.238.30 ▲0.2349.96 ▲3.25
Dashboard /wp-admin2,967 ▲305.89 ▼0.05141.16 ▼26.83116.06 ▼8.09
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0170.88 ▲5.3498.68 ▲2.67
Add New Post /wp-admin/post-new.php1,683 ▼018.22 ▼0.46395.37 ▼21.77111.43 ▼0.56
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.01165.30 ▲6.00125.81 ▲3.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/remove-pages-from-search/remove-pages-from-search.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: query, posts, pages, search results

remove-pages-from-search/remove-pages-from-search.php Passed 13 tests

The primary PHP file in "Remove Pages From Search" version 1.0 is used by WordPress to initiate all plugin functionality
127 characters long description:
Simple yet effective plugin that once enabled, will allow only posts with post type POST to be included in your search results.

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
Success! There were no dangerous files found in this plugin11 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP241011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected