67% factory-women

Code Review | Factory Women

WordPress plugin Factory Women scored67%from 54 tests.

About plugin

  • Plugin page: factory-women
  • Plugin version: 0.1-alpha...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Aug 27, 2014
  • Latest release: Aug 27, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: theblasfem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /649 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.95MB] [CPU: ▼38.22ms] Passed 4 tests

Analyzing server-side resources used by Factory Women
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.12 ▼2.88
Dashboard /wp-admin3.00 ▼0.3520.94 ▼43.54
Posts /wp-admin/edit.php3.00 ▼0.3623.48 ▼29.18
Add New Post /wp-admin/post-new.php3.00 ▼2.8921.50 ▼71.84
Media Library /wp-admin/upload.php3.00 ▼0.2323.11 ▼8.33

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Factory Women
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.53 ▼0.031.91 ▲0.2140.50 ▼5.34
Dashboard /wp-admin2,199 ▲195.56 ▼0.1188.33 ▼3.1339.64 ▼4.19
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0134.88 ▼0.6732.63 ▼3.02
Add New Post /wp-admin/post-new.php1,529 ▲323.06 ▲0.20646.93 ▲44.2861.07 ▼3.49
Media Library /wp-admin/upload.php1,404 ▲14.20 ▼0.1394.37 ▼6.1544.42 ▲1.89
Factory /wp-admin/factorywomen.php260.420.1114.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(/../../../../wordpress-develop/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/factory-women/tests/bootstrap.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/factory-women/tests/test-sample.php:3
    • > PHP Fatal error
      require_once(): Failed opening required '/../../../../wordpress-develop/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/factory-women/tests/bootstrap.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/factorywomen.php
    • > Network (severe)
    wp-admin/factorywomen.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === factory-women === )
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

factory-women/factorywomen.php 69% from 13 tests

The entry point to "Factory Women" version 0.1-alpha... is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "0.1-alpha...")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("factory-women.php" instead of "factorywomen.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
Success! There were no dangerous files found in this plugin210 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3271385
Bourne Shell115459
HTML10037
XML10014
YAML14012
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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
There are no PNG files in this plugin