84% select-post-export

Code Review | Select Post Export

WordPress plugin Select Post Export scored84%from 54 tests.

About plugin

  • Plugin page: select-post-export
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Dec 30, 2021
  • Latest release: Mar 31, 2023
  • Number of updates: 14
  • Update frequency: every 36.9 days
  • Top authors: ilenejohnson (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /1,349 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.79ms] Passed 4 tests

An overview of server-side resources used by Select Post Export
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.28 ▼3.36
Dashboard /wp-admin3.37 ▲0.0744.95 ▼5.02
Posts /wp-admin/edit.php3.42 ▲0.0744.03 ▼0.23
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.81 ▼5.15
Media Library /wp-admin/upload.php3.30 ▲0.0732.66 ▼1.63

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Select Post Export
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8013.24 ▼1.114.95 ▲2.9246.63 ▼1.51
Dashboard /wp-admin2,212 ▲244.84 ▼0.04118.50 ▼0.7540.14 ▼5.57
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0133.76 ▼4.0534.64 ▼1.55
Add New Post /wp-admin/post-new.php1,552 ▲3223.28 ▲0.22675.47 ▲6.5756.65 ▼7.23
Media Library /wp-admin/upload.php1,400 ▲124.17 ▼0.04103.07 ▲6.8241.22 ▼3.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(SPEX_EXPORT_DIR/includes/select-post-export-class.php): failed to open stream: No such file or directory in wp-content/plugins/select-post-export/includes/post-export-options.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SPEX_post_export\\exportclass\\add_action() in wp-content/plugins/select-post-export/includes/select-post-export-class.php:275
    • > PHP Fatal error
      require_once(): Failed opening required 'SPEX_EXPORT_DIR/includes/select-post-export-class.php' (include_path='.:/usr/share/php') in wp-content/plugins/select-post-export/includes/post-export-options.php on line 6
    • > PHP Warning
      Use of undefined constant SPEX_EXPORT_DIR - assumed 'SPEX_EXPORT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/select-post-export/includes/post-export-options.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/select-post-export/post-export.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: import, export

select-post-export/post-export.php 85% from 13 tests

The principal PHP file in "Select Post Export" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("select-post-export.php" instead of "post-export.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected295 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP46954281
Markdown113014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity2.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants3
▷ Global constants3100.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 images were found in this plugin