10% post-export

Code Review | Post Export Module

WordPress plugin Post Export Module scored10%from 54 tests.

About plugin

  • Plugin page: post-export
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Mar 24, 2014
  • Latest release: Mar 26, 2014
  • Number of updates: 6
  • Update frequency: every 3.3 days
  • Top authors: Nethuestechnologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,679 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/post-export/posts_export.php+45
    Undefined index: post_type

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.69ms] Passed 4 tests

Server-side resources used by Post Export Module
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.25 ▼6.96
Dashboard /wp-admin2.05 ▼1.266.42 ▼47.05
Posts /wp-admin/edit.php2.05 ▼1.316.34 ▼46.02
Add New Post /wp-admin/post-new.php2.05 ▼3.846.45 ▼88.76
Media Library /wp-admin/upload.php2.05 ▼1.185.62 ▼32.91

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Post Export Module
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▲0.041.88 ▼0.1743.53 ▼1.14
Dashboard /wp-admin2,195 ▲155.61 ▼0.0589.29 ▼10.4141.93 ▲0.78
Posts /wp-admin/edit.php2,284 ▲1842.04 ▲0.0636.06 ▲1.2232.52 ▼5.83
Add New Post /wp-admin/post-new.php1,525 ▼322.09 ▼0.85707.81 ▲22.7552.86 ▼0.31
Media Library /wp-admin/upload.php1,394 ▼34.22 ▲0.03100.79 ▼8.9043.85 ▲0.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/post-export/posts_export.php+45
    Undefined index: post_type
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/post-export/posts_export.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png shows a new option on the posts listing bulk option selectbox.), #2 (screenshot-2.png shows the export selection pop-up when admin click Apply after selecting posts.), #3 (screenshot-3.png shows selection of all posts which inturn shows all posts pages available and allow to select all or limited pages posts.), #4 (screenshot-4.png shows pop-up to save excel file after clicking Export button)
The official readme.txt might help

post-export/posts_export.php 92% from 13 tests

The principal PHP file in "Post Export Module" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("post-export.php" instead of "posts_export.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin603 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11520273
JavaScript1153199
CSS100131

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity24.50
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity16.67
▷ Minimum method complexity3.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
4 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png30.07KB18.48KB▼ 38.55%
screenshot-2.png43.89KB22.35KB▼ 49.08%
screenshot-3.png40.23KB22.27KB▼ 44.64%
screenshot-4.png54.35KB27.05KB▼ 50.23%